3.1.8 · D3Boolean Algebra & Logic Gates

Worked examples — De Morgan's theorems

2,128 words10 min readBack to topic

Everything here rests on the two theorems from De Morgan's theorems:

Before we start, one reminder of the symbols so nothing is used before it's built:


The scenario matrix

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 ( inside) double-negation appears Ex 3
C4 Degenerate: a constant ( or ) inside must swap 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:


Ex 1 — Cell C1: plain AND under a bar

Figure — De Morgan's theorems

Ex 2 — Cell C2: plain OR under a bar


Ex 3 — Cell C3: an input already inverted


Ex 4 — Cell C4: degenerate case with a constant


Ex 5 — Cell C5: nested bars


Ex 6 — Cell C6: 3 variables, mixed operators


Ex 7 — Cell C7: real-world word problem


Ex 8 — Cell C8: hardware / bubble-pushing twist

Figure — De Morgan's theorems

Ex 9 — Cell C9: the exam trap


Recall

Recall Test yourself on the scenario matrix

Which theorem for a top-level AND under a bar? ::: Theorem 1 — becomes OR of the complements. simplifies to? ::: equals? ::: (since and OR- does nothing) equals? ::: (since and AND- does nothing) equals? ::: Negate . ::: "Not (door closed AND window closed)" as an OR? ::: door open OR window open A NAND equals which OR circuit? ::: OR of two inverted inputs, Why is wrong? ::: forgot to flip AND to OR; fails at .


Connections

Concept Map

enumerates

enumerates

enumerates

enumerates

enumerates

enumerates

enumerates

enumerates

enumerates

uses

uses

uses

Scenario matrix

C1 plain AND

C2 plain OR

C3 inner invert

C4 constant

C5 nested bars

C6 mixed 3 var

C7 word problem

C8 bubble push

C9 exam trap

Break the bar change the sign