Intuition What this page is for
The parent note taught you the rule: break the bar, change the sign . This page proves you can survive every situation an exam or a real circuit throws at you. We first lay out a scenario matrix — a checklist of every type of problem — then work one example per cell so no case surprises you.
Everything here rests on the two theorems from De Morgan's theorems :
A ⋅ B = A + B A + B = A ⋅ B
Before we start, one reminder of the symbols so nothing is used before it's built:
Definition The three symbols we rely on
The bar X means "NOT X " — it flips 1 to 0 and 0 to 1 . The length of the bar tells you what it covers : A ⋅ B (one long bar) negates the whole product; A ⋅ B (two short bars) negates each variable separately. These are different!
The dot ⋅ means AND — output 1 only when both inputs are 1 .
The plus + means OR — output 1 when at least one input is 1 .
Every De Morgan problem you will ever meet falls into one of these cells. The last column names the example that clears it.
Cell
Scenario
What makes it tricky
Cleared by
C1
Plain 2-variable AND under a bar
the baseline case
Ex 1
C2
Plain 2-variable OR under a bar
flip the other way
Ex 2
C3
An input already inverted (A inside)
double-negation appears
Ex 3
C4
Degenerate: a constant (0 or 1 ) inside
must swap 0 ↔ 1 correctly
Ex 4
C5
Nested bars (bar-over-a-bar-over-a-group)
apply theorem twice, peel outer first
Ex 5
C6
3+ variables, mixed AND/OR (sum-of-products)
scope + operator precedence
Ex 6
C7
Real-world word problem (a rule in English)
translate English → symbols
Ex 7
C8
Hardware twist: NAND ⇒ OR-of-inverts (bubble pushing)
reading the theorem as a circuit
Ex 8
C9
Exam trap: the "looks right but forgot to flip" answer
catch the classic error
Ex 9
The idea (from Complement of a Function ) is always the same recipe:
A ⋅ B and prove it by table
Forecast: Guess the answer before reading. Does the AND become OR? Do both variables get bars?
Step 1. Top-level operator under the bar is ⋅ (AND).
Why this step? Theorem 1 only fires on an AND. We must identify it first — the bar covers both A and B , so the whole product is being negated.
Step 2. Flip AND→OR, negate each variable:
A ⋅ B = A + B
Why this step? "Break the bar, change the sign." One long bar becomes two short bars with + between.
Verify: Build the tiny table (see the figure below). At A = 1 , B = 0 : LHS = 1 ⋅ 0 = 0 = 1 ; RHS = 1 + 0 = 0 + 1 = 1 . ✓ Both sides agree on all four rows.
A + B
Forecast: This time the operator underneath is + . Which theorem, and which way does it flip?
Step 1. Top-level operator is + (OR).
Why this step? That selects Theorem 2. The bar spans the whole sum A + B .
Step 2. Flip OR→AND, negate each variable:
A + B = A ⋅ B
Why this step? Same slogan, opposite direction: an OR under a bar becomes an AND.
Verify: At A = 0 , B = 1 : LHS = 0 + 1 = 1 = 0 ; RHS = 0 ⋅ 1 = 1 ⋅ 0 = 0 . ✓ At A = 0 , B = 0 : LHS = 0 = 1 ; RHS = 1 ⋅ 1 = 1 . ✓
A ⋅ B
Forecast: There's already a bar on A inside . After we break the outer bar, what happens to that inner bar?
Step 1. Outer bar covers A ⋅ B , whose top operator is ⋅ . Apply Theorem 1:
A ⋅ B = A + B
Why this step? Break the AND into OR; each factor — including A — gets an extra bar on top.
Step 2. Double negation: A = A .
= A + B
Why this step? Negating twice returns the original value — a bar undoing a bar.
Verify: At A = 0 , B = 1 : LHS = 0 ⋅ 1 = 1 ⋅ 1 = 1 = 0 ; RHS = 0 + 1 = 0 + 0 = 0 . ✓ At A = 1 , B = 1 : LHS = 0 ⋅ 1 = 1 ; RHS = 1 + 0 = 1 . ✓
A ⋅ 1 and A + 0
Forecast: What is 1 ? What is 0 ? Do the constants survive?
Step 1 (first expression). Apply Theorem 1 to A ⋅ 1 :
A ⋅ 1 = A + 1 = A + 0 = A
Why this step? Break the AND; the constant 1 becomes 1 = 0 , and "OR 0 " changes nothing. This matches the direct route: A ⋅ 1 = A , so A ⋅ 1 = A . Both agree.
Step 2 (second expression). Apply Theorem 2 to A + 0 :
A + 0 = A ⋅ 0 = A ⋅ 1 = A
Why this step? Break the OR; the constant 0 becomes 0 = 1 , and "AND 1 " changes nothing. Direct route: A + 0 = A , so A + 0 = A . Agree.
Verify: At A = 1 : first gives 1 = 0 ; second gives 1 = 0 . At A = 0 : both give 0 = 1 . ✓ The degenerate case behaves — constants must be flipped (0 ↔ 1 ), never ignored.
Common mistake The constant trap
Forgetting to flip the constant gives A ⋅ 1 = A + 1 = 1 , which is wrong (it says "always true"). You must apply 1 = 0 .
A + B and then A + B
Forecast: A bar over a bar. Do you peel from the outside in, or inside out?
Step 1 (first). A + B : the outermost bar sits over a single barred quantity, so double negation applies directly:
A + B = A + B
Why this step? A bar over a complete expression that is itself a bar just cancels — no theorem needed. Always peel the outer bar first.
Step 2 (second, harder). A + B : the outer bar covers a sum of two barred variables. Apply Theorem 2 (OR→AND, negate each term):
A + B = A ⋅ B
Why this step? Top operator under the outer bar is + , so flip to ⋅ and put a fresh bar on each term A and B .
Step 3. Double-negate both: A = A , B = B :
= A ⋅ B
Why this step? Each pair of bars cancels — this is just Theorem 1 read backwards, a neat consistency check.
Verify: At A = 1 , B = 0 : second expression LHS = 1 + 0 = 0 + 1 = 1 = 0 ; RHS = 1 ⋅ 0 = 0 . ✓
F = A ⋅ B + C
Forecast: With both AND and OR present, which one is "top level"? (Hint: think about which operator binds loosest .)
Step 1. Precedence: AND binds tighter than OR, so F = ( A ⋅ B ) + ( C ) . The top-level operator is + . Apply Theorem 2:
F = ( A ⋅ B ) ⋅ ( C )
Why this step? We negate at the outermost level first; the OR joining the two big terms is what the bar sees first.
Step 2. Simplify each piece. Inner AND via Theorem 1: A ⋅ B = A + B . Double negation: C = C :
F = ( A + B ) ⋅ C
Why this step? Once the outer level is broken, recurse into each remaining group.
Verify: At A = 1 , B = 1 , C = 0 : F = 1 ⋅ 1 + 0 = 1 + 1 = 1 , so F = 0 . RHS = ( 1 + 1 ) ⋅ 0 = ( 0 ) ⋅ 0 = 0 . ✓ At A = 1 , B = 0 , C = 1 : F = 0 + 1 = 0 , so F = 1 ; RHS = ( 0 + 1 ) ⋅ 1 = 1 . ✓
Worked example The alarm rule
A house alarm sounds when it is NOT the case that (the door is closed AND the window is closed) . Let D = 1 mean "door closed", W = 1 mean "window closed". Write the alarm condition as a simple OR.
Forecast: English "not (both closed)" — will it become "at least one open"?
Step 1. Translate: alarm = D ⋅ W .
Why this step? "Door closed AND window closed" is D ⋅ W ; "NOT the case that" is the outer bar.
Step 2. Apply Theorem 1:
alarm = D ⋅ W = D + W
Why this step? Break the AND into OR — reading back into English: "door open OR window open."
Verify: Door open, window closed (D = 0 , W = 1 ): LHS = 0 ⋅ 1 = 0 = 1 (alarm on) — correct, a door is open. RHS = 0 + 1 = 1 + 0 = 1 . ✓ Both closed (D = 1 , W = 1 ): LHS = 1 = 0 (silent); RHS = 0 + 0 = 0 . ✓ The English and the algebra match perfectly.
Worked example Rebuild a NAND gate as an OR gate with inverters
Forecast: A NAND computes A ⋅ B . Theorem 1 says that equals A + B . What circuit is "A + B "?
Step 1. Start from the NAND output A ⋅ B and apply Theorem 1:
A ⋅ B = A + B
Why this step? This is literally: "invert each input, then OR them." See the figure — the AND-with-output-bubble redraws as an OR-with-input-bubbles.
Step 2. Read it as gates: two NOT gates feed an OR gate. That single equation is the bubble-pushing move — a bubble on the output of an AND slides backward to become bubbles on the inputs of an OR.
Why this matters: this is why NAND is universal — see Bubble Pushing for the graphical version.
Verify: Truth check at A = 1 , B = 0 : NAND = 1 ⋅ 0 = 1 ; OR-of-inverts = 1 + 0 = 0 + 1 = 1 . ✓ At A = 1 , B = 1 : NAND = 1 = 0 ; OR-of-inverts = 0 + 0 = 0 . ✓
Worked example Catch the wrong answer
A student writes A ⋅ B = A ⋅ B . Show, with a single input row, that this is false, and give the correct answer.
Forecast: Which row breaks it? (Look for where AND and OR disagree .)
Step 1. The claimed identity kept the AND instead of flipping it. Test A = 1 , B = 0 :
True LHS: 1 ⋅ 0 = 0 = 1 .
Wrong RHS: 1 ⋅ 0 = 0 ⋅ 1 = 0 .
Why this step? One mismatched row is enough to disprove an identity (equality must hold on all rows).
Step 2. 1 = 0 , so the identity is false . The correct De Morgan result is:
A ⋅ B = A + B
Why this step? The slogan demands you change the sign: AND must become OR.
Verify: With the correct RHS at the same row: 1 + 0 = 0 + 1 = 1 = LHS. ✓ Trap defused.
Common mistake The classic slip
"Bar each variable, keep the operator." Feels tidy, is wrong. Bar each variable and flip the operator .
Recall Test yourself on the scenario matrix
Which theorem for a top-level AND under a bar? ::: Theorem 1 — becomes OR of the complements.
A ⋅ B simplifies to? ::: A + B
A ⋅ 1 equals? ::: A (since 1 = 0 and OR-0 does nothing)
A + 0 equals? ::: A (since 0 = 1 and AND-1 does nothing)
A + B equals? ::: A ⋅ B
Negate A ⋅ B + C . ::: ( A + B ) ⋅ C
"Not (door closed AND window closed)" as an OR? ::: door open OR window open = D + W
A NAND equals which OR circuit? ::: OR of two inverted inputs, A + B
Why is A ⋅ B = A ⋅ B wrong? ::: forgot to flip AND to OR; fails at A = 1 , B = 0 .
Break the bar change the sign