Professional Documents
Culture Documents
LOGIC
+ Crucial for mathematical reasoning
+ Important for program design
+ Used for designing electronic circuitry
2
Propositional Logic
Propositional Logic is the logic of compound
statements built from simpler statements
using so-called Boolean connectives. George Boole
(1815-1864)
yes
Is this a proposition?
5
The Statement/Proposition Game
“520 < 111”
Is this a statement? no
It’s a request.
Is this a proposition? no
p ¬p
T F
F T
Examples
p q p∧q
T T T
T F F
F T F
F F F
Examples
p q p ∨q
T T T
T F T
F T T
F F F
Examples
p q p ⊕q
T T F
T F T
F T T
F F F
Note that p q means that p is true, or q is true, but not both!
This operation is called exclusive or, because it excludes the possibility that
both p and q are true.
•Implication (if - then)
antecedent consequent
Solution:
Converse : If I do not go to town, then it is raining.
Inverse : If it is not raining, then I will go to town.
Contrapositive : If I go to town, then it is not raining.
•Converse
The converse of a conditional statement is formed by
switching the hypothesis and the conclusion.
Example:
p q p ↔q
T T T
T F F
F T F
F F T
+
Examples
p q = “Trump will be president for all of 2021 if and only if Trump wins the
2020 election,.”
p q means that p and q have the same truth value.
T F T F
F T T F
Boolean Operations Summary
We have seen 1 unary operator (out of the 4 possible) and 5 binary
operators (out of the 16 possible). Their truth tables are below.
T T T F T F
T T F T T T
T F T F T F
T F F T T T
F T T F T F
F T F T T T
F F T F F T
F F F T F T
ACTIVITY 1: