Académique Documents
Professionnel Documents
Culture Documents
المنطق البولياني
Epp, sections 1.1 and 1.2
p q result conclusion
T T T T
T F ? F
F T ? T
F F T T
Dr. Iyad Hatem 23
Translation Example 2
• “I have neither given nor received help on
this exam”
– Rephrased: “I have not given nor received …”
– Let p = “I have given help on this exam”
– Let q = “I have received help on this exam”
• Translation
p is: pq
q p pq
T T F F
T F F T
F T T F
F F Dr. Iyad Hatem T F 24
Translation Example 2
• What they mean is “I have not given and I
have not received help on this exam”
– Or “I have not (given nor received) help on
this exam”
p q pq (pq)
T T F F
T F F F
F T F F
F F T T
p F pF
T F F
F F
Dr. Iyad Hatem
F 28
Logical Equivalences of And
• pp≡p Idempotent law
p p pp
T T T
F F F
• pq≡qp Commutative law
p q pq qp
T T T T
T F F F
F T F F
F F Dr. Iyad HatemF F 29
Logical Equivalences of And
• (p q) r ≡ p (q r) Associative law
p q r pq (pq)r qr p(qr)
T T T T T T T
T T F T F F F
T F T F F F F
T F F F F F F
F T T F F T F
F T F F F F F
F F T F F F F
F F F F F F F
Dr. Iyad Hatem 30
Logical Equivalences of Or
• pT≡T Identity law
• pF≡p Domination law
• pp≡p Idempotent law
• pq≡qp Commutative law
• (p q) r ≡ p (q r) Associative law
• Absorption
p (p q) ≡ p
p (p q) ≡ p
( p r ) (q r ) ( p q) r
( p r ) (q r ) ( p q) r Original statement
(p Definition
p)
(r (
r ) ( r )
q q pr )q) r ( p pq
of(implication
) qr p q
DeMorgan’s Law ( p q) p q
Associativity
p r q ofrOr (ppr q) (rq r ) p r q r
Re-arranging
p q r r p q r
p q
Idempotent r
Law p
r q
r r r
f (b f ) s T Re-arranging
( f b) ( f f ) s T Distributive law
( f b) F s T Negation law
( f b) s T Domination law
f b s T Associativity of AND
Dr. Iyad Hatem 41
What if it weren’t possible to assign
such values to s, b, and f?
f b s s T Re-arranging
f b F T Negation law
f F T Domination law
F T Domination law
Contradiction!
F T T
F F F Idea 3: Guess and check
p q
T T F T F F
T F T T T T
F T T T T T
F F F F T F
Given a truth table, how to write a logical formula with the same function?
First write down a small formula for each row, so that the formula
is true if the inputs are exactly the same as the row.
Digital logic: