This Photo by Unknown Author is licensed under CC BY-SA-NC.
Propositional logic. Propositional logic means a type of logic that deals with propositions — sentences or statements that can be either true (T) or false (F), but not both at the same time. Word meaning: Propositional → comes from the word proposition, meaning a statement or claim. Logic → the study of reasoning and rules of thought. So, propositional logic literally means: “The logic of statements that can be true or false.” Example:.
Example. Statement Symbol Truth value It is raining P T/F The Sky is blue P T/F.
You can combine them with logical connectives: p ∧ q → It is raining and the sky is blue. p ∨ q → It is raining or the sky is blue. ¬p → It is not raining..
Disjunction (OR). Definition The disjunction p ∨ q is true if at least one of the propositions is true. It is false only when both are false. Example in English P ; it is raining . Q ; it is cloudy. Then P or q ; it is raining or it is cloudy. This statement will be true if either it’s raining, or cloudy, or both..
Truth Table for disjunction. P Q P or Q T T T T F T F T T F F F.
Conjunction (And). Definition The conjunction p ∧ q is true only when both p and q are true. If either one is false, the whole statement becomes false. Example in English p it is raining q it is cloudy p and q : it is raining and it is cloudy This statement will be true only if both it’s raining and it’s cloudy at the same time.
Truth table of Conjunction. P Q P and Q T T T T F F F T F F F F.
Exclusive OR. Definition of Exclusive OR Exclusive OR means “either p or q, but not both.” The statement p exclusive or q is true when exactly one of two statement Is true. It is false when both are false It is also false when both are true. Examples English statement of Exclusive OR A student passes if either the test or assignment is good, but not both. A student will get a job if and only if they have good skill or degree..
Truth table of Exclusive OR. P Q P exclusive OR Q T T F T F T F T T F F F.
Implies or condition in propositional logic(if and then).
Truth table of implies. p Q P implies Q T T T T F F F T T F F T.
Double implies or biconditional (if and only if).
Truth table of double implies. P Q P double implies Q T T T T F F F T F F F T.
Negation (NOT). Definition • Symbol: ¬ • Meaning: The opposite of a statement. • Example: If P: 'It is raining', then ¬P: 'It is not raining Truth Table: P | ¬P T | F F | T.
Summary. Symbol Name Meaning Example Result ¬ Negation Not ¬p True if p is false ∧ Conjunction And p ∧ q True if both p and q are true ∨ Disjunction OR p ∨ q True if p or q (or both) are true → Implication If then p → q False only if p is true and q is false ↔ Biconditional If and only if p ↔ q True if p and q have the same truth value.
Application. Digital circuit design(logic gates) Artificial intelligence(knowledge representation) Mathematics(proofs) Computer Science(algorithms, programming) Encryption and Security.
This Photo by Unknown Author is licensed under CC BY-SA.