Lecture-2
Lecture-2
Lecture - 2
When p is false and q is true all three statements are true. So the specification
is true.
Logic Circuits
• Propositional logic can be applied to the design of computer hardware.
• A logic circuit (or digital circuit) receives input signals p1, p2, . . . , pn,
each a bit [either 0 (off) or 1 (on)] and produces output signals s1, s2,
. . . , sn, each a bit.
• Contradiction
A compound proposition that is always false.
• Contingency
A compound proposition that is neither a tautology nor a contradiction.
Tautology, Contradiction & Contingency
• Example of a tautology and a contradiction
p ¬p p ∨ ¬p p ∧ ¬p
T F T F
F T T F
Logical Equivalences
• Compound propositions that have the same truth values in all possible
cases are called logically equivalent.
• The compound propositions p and q are called logically equivalent if
p ↔ q is a tautology.
• The notation p ≡ q denotes that p and q are logically equivalent.
Logical Equivalences
Key Logical Equivalences
Using De Morgan’s Laws
• The two logical equivalences known as De Morgan’s laws are particularly
important.
• They tell us how to negate conjunctions and how to negate disjunctions.
Using De Morgan’s Laws
• Example: Use De Morgan’s laws to express the negations of :
“Miguel has a cellphone and he has a laptop computer”
Let p be “Miguel has a cellphone” and q be “Miguel has a laptop computer.” Then
“Miguel has a cellphone and he has a laptop computer” can be written as p ∧ q.
Using De Morgan’s law, ¬ (p ∧ q) ≡ (¬ p ∨ ¬ q)