DeMorgan's theorem
The single most useful identity in digital design — what a NOT bar over a whole AND or OR really means. "Break the bar, change the sign."
Built from first principles. Augustus De Morgan, 1806–1871.
Before you start
What you need first
- Derived gates — NAND/NOR are inverted AND/OR.
- Theorems & simplification — and the truth-table check.
What you'll be able to do
- State and apply the two DeMorgan identities.
- Prove an identity with a truth table.
- Push a NOT bar through a nested expression, outside-in.
When the bar sits over a whole group
So far NOT applied to a single variable — A′ means "flip A." But what does a
bar over a whole expression like (A·B)′ equal in terms of A and B?
(A·B)′ is just a NAND you can't
compare with anything. With it, (A·B)′ = A′ + B′ — now you can
simplify, translate, and mix it with other gates.The two identities
- The complement of an AND is the OR of the complements.
- The complement of an OR is the AND of the complements.
Proof by truth table (identity #1)
Claim: (A·B)′ = A′ + B′. Compare the two columns for every row:
| A | B | A·B | (A·B)′ | A′ | B′ | A′+B′ |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
(A·B)′ and A′+B′ match on every row → the two
expressions are the same function. ✓ The same method proves any Boolean identity.Why DeMorgan matters
1. Reformulating. The same condition, two phrasings. A door alarm:
"not both doors closed" (D1·D2)′ equals "at least one door open"
D1′ + D2′ — same circuit, suits different readers.
2. Bubble-pushing. Need a NAND-only build? A+B = (A′·B′)′,
so an OR becomes NANDs. The inversion bubbles slide around a schematic, obeying DeMorgan.
Push the bar, outside-in
✏️ Try it yourself
(a) (A+B)′ (b) (X·Y)′ (c) (A+B+C)′
as a product (d) ((A·B′)+C)′
A′·B′.
(b) X′+Y′.
(c) A′·B′·C′.
(d) outer: (A·B′)′·C′; inner: (A·B′)′ = A′+B → (A′+B)·C′.
Recap — the whole topic on one screen
| Idea | What you own now |
|---|---|
| Identity #1 | (A·B)′ = A′ + B′ |
| Identity #2 | (A+B)′ = A′·B′ |
| Rule of thumb | break the bar, change the sign (work outside-in) |
| Why it's everywhere | reformulating · NAND/NOR builds · synthesis tools |