DE-03: Boolean Algebra & Logic Gates — VLSI Trainers
Digital Electronics Series · DE-03

Boolean Algebra & Logic Gates

AND, OR and NOT operations — Huntington’s postulates, Boolean theorems including De Morgan’s, Duality principle, Venn diagrams, SOP and POS canonical forms, and realization using NAND/NOR universal gates.

Logic Operations — AND, OR, NOT

Every digital circuit is built from three primitive logic operations. A logic variable can only take two values — 0 (false/low) or 1 (true/high). The three operations combine these variables:

A B Y
AND Gate
Y = A · B
Output HIGH only when ALL inputs are HIGH
A B Y
OR Gate
Y = A + B
Output HIGH when ANY input is HIGH
A Ā
NOT / Inverter
Y = Ā
Output is complement of input — unary operator
ABAND (A·B)OR (A+B)NOT (Ā)
00001
01011
10010
11110
AND vs OR memory aid. AND is both — student needs books AND ID card. OR is either — student needs books OR ID card. NOT is inverse — student without phone is allowed in.

📐 Huntington’s Postulates of Boolean Algebra

E.V. Huntington (1904) defined six postulates that form the axiomatic foundation of Boolean algebra. All theorems are derived from these — they are assumed true without proof.

#PostulateOR formAND form (dual)
P1ClosureA + B ∈ SA · B ∈ S
P2Commutative LawA + B = B + AA · B = B · A
P3Identity ElementA + 0 = A  (identity = 0)A · 1 = A  (identity = 1)
P4Distributive LawA + B·C = (A+B)·(A+C)A·(B+C) = A·B + A·C
P5Complement LawA + Ā = 1A · Ā = 0
P6Non-trivialityAt least two elements exist: A ≠ B
Key difference from ordinary algebra. Postulate P4 OR form — A + B·C = (A+B)·(A+C) — has no equivalent in ordinary algebra. This and the complement law (P5) make Boolean algebra fundamentally different from arithmetic.

🔢 Two-Valued Boolean Algebra (Switching Algebra)

When the set S = {0, 1}, the postulates reduce to the switching algebra rules used directly in digital circuits:

Two-Valued (Switching) Boolean Algebra — Complete Rule Set OR RULES 0+0=0 0+1=1 1+0=1 1+1=1 A+0=A A+1=1 A+A=A A+Ā=1 Identity · Null · Idempotent · Complement AND RULES 0·0=0 0·1=0 1·0=0 1·1=1 A·1=A A·0=0 A·A=A A·Ā=0 Identity · Null · Idempotent · Complement
Figure 1 — Complete switching algebra rule set. Every rule on the left has a dual on the right — swap + with ·, and swap 0 with 1.

🔄 Duality Principle

The Duality Principle states that any theorem or identity in Boolean algebra remains valid if you simultaneously:

This halves the proof work — prove one form, the dual is automatically valid.

📏 Boolean Theorems

#TheoremOR formAND form (dual)Name
1IdempotentA + A = AA · A = A
2Null elementA + 1 = 1A · 0 = 0
3AbsorptionA + A·B = AA·(A + B) = AAbsorption Law
4InvolutionĀ̄ = A (double complement = original)
5Consensus / 2nd AbsorptionA + Ā·B = A + BA·(Ā + B) = A·BRedundancy / Consensus
6De Morgan’sA·B̄ = Ā + B̄A+B̄ = Ā·B̄De Morgan’s Theorem
7Associative(A+B)+C = A+(B+C)(A·B)·C = A·(B·C)
Proof — Absorption Theorem: A + A·B = A
StartA + A·B
Step 1= A·1 + A·B     (since A·1 = A)
Step 2= A·(1 + B)     (distributive law)
Step 3= A·1           (since 1 + B = 1)
= A    ✓ Proved
Proof — Consensus Theorem: A + Ā·B = A + B
StartA + Ā·B
Step 1= (A + Ā)·(A + B)     (distributive law P4-OR)
Step 2= 1·(A + B)         (since A + Ā = 1)
= A + B    ✓ Proved

🔀 De Morgan’s Theorems

De Morgan’s theorems are among the most useful in digital design — they allow any gate to be converted to its complement form:

De Morgan’s Theorems — Both Forms Theorem 1 — NAND identity A·B = Ā + B̄ “The complement of a product equals the sum of the complements” Theorem 2 — NOR identity A+B = Ā · B̄ “The complement of a sum equals the product of the complements”
Figure 2 — De Morgan’s theorems. These extend to n variables: the complement of any AND expression equals the OR of all complements, and vice versa.

Truth Table Verification (2 variables)

ABA·BĀ·B̄ (=A·B)ĀĀ+B̄ (=A·B)
0001111
0110101
1010011
1110000

Columns 4 and 7 (A·B̄ and Ā+B̄) are identical — confirming Theorem 1.

📝 Canonical Forms — SOP and POS

Any Boolean function can be expressed in two standard canonical forms that are directly derivable from a truth table:

SOP vs POS — How to Read Them from a Truth Table SOP — Sum of Products (Canonical SP) 1. Find all rows where output F = 1 2. Write a minterm (AND of all variables) for each row  (complement variable if its column = 0, keep if = 1) POS — Product of Sums (Canonical PS) 1. Find all rows where output F = 0 2. Write a maxterm (OR of all variables) for each row  (complement variable if its column = 1, keep if = 0)
Figure 3 — Minterms and maxterms are opposite: a minterm uses complemented variables for 0-inputs; a maxterm uses complemented variables for 1-inputs.

📊 Minterms, Maxterms and Notation

For n variables there are 2ⁿ minterms (m₀–m₂ₙ₋₁) and 2ⁿ maxterms (M₀–M₂ₙ₋₁). The subscript is the decimal value of the input combination.

RowABCMinterm (mᵢ)Maxterm (Mᵢ)
0000m₀ = Ā·B̄·C̄M₀ = A+B+C
1001m₁ = Ā·B̄·CM₁ = A+B+C̄
2010m₂ = Ā·B·C̄M₂ = A+B̄+C
3011m₃ = Ā·B·CM₃ = A+B̄+C̄
4100m₄ = A·B̄·C̄M₄ = Ā+B+C
5101m₅ = A·B̄·CM₅ = Ā+B+C̄
6110m₆ = A·B·C̄M₆ = Ā+B̄+C
7111m₇ = A·B·CM₇ = Ā+B̄+C̄
Example 3.4 — Express F = A·B + B·C in canonical SOP and POS forms

SOP — expand missing variables using X = X·(Y+Ȳ):

ExpandF = A·B·(C+C̄) + (A+Ā)·B·C
Expand= A·B·C + A·B·C̄ + A·B·C + Ā·B·C = A·B·C̄ + A·B·C + Ā·B·C
Notation= m₆ + m₇ + m₃
F(SOP) = Σ(3, 6, 7)

POS — the missing minterms are the maxterms:

F(POS) = Π(0, 1, 2, 4, 5)  ← complement of SOP minterm set
SOP ↔ POS conversion shortcut. The minterm indices of SOP and the maxterm indices of POS for the same function are always complementary — they partition the full set {0…2ⁿ−1}. To convert: swap Σ ↔ Π and use the numbers missing from the original set.

🔌 Other Logic Gates — NAND, NOR, XOR, XNOR

A B
NAND Gate
Y = A·B = Ā+B̄
LOW only when ALL inputs HIGH. Universal gate.
A B
NOR Gate
Y = A+B = Ā·B̄
HIGH only when ALL inputs LOW. Universal gate.
A B
XOR Gate
Y = A⊕B = Ā·B+A·B̄
HIGH when inputs differ (odd parity). Used in adders.
A B
XNOR Gate
Y = A⊙B = A·B+Ā·B̄
HIGH when inputs are equal. Used in comparators.
ABNANDNORXORXNOR
001101
011010
101010
110001

🌐 NAND and NOR as Universal Gates

A gate is universal if any Boolean function — and therefore any logic circuit — can be built using only that gate type. Both NAND and NOR are universal because AND, OR and NOT can each be constructed from them.

Building AND, OR, NOT from NAND gates only NOT from NAND NAND A → Y = A̅·A̅ = A̅ Tie both inputs to A AND from 2 NANDs NAND NAND A, B → NAND → NOT-NAND → A·B A·B̄ → complement → A·B OR from 3 NANDs (De Morgan) NAND(A,A) NAND(B,B) NAND(Ā,B̄) Ā+B̄ = NAND(Ā,B̄) — De Morgan confirms: NAND(Ā,B̄) = A+B NOR is also universal — by symmetry: NOT = NOR(A,A); OR = NOR → NOT-NOR; AND = NOR(Ā,B̄) In practice: NAND-based (74LS00 family) is most common; CMOS uses both. Minimizing gate count prefers one type throughout a design.
Figure 4 — Any Boolean function can be implemented using NAND gates alone (or NOR gates alone). This is why NAND and NOR are called universal gates.

⚙️ Realization of Boolean Functions

The design process: express the function in minimal SOP → draw the gate network. Minimization reduces gate count significantly.

Example 3.7 — Reduce F₁(A,B,C,D) = Σ(0,1,2,6,7,14,15) using Boolean algebra
Write= Ā·B̄·C̄·D̄ + Ā·B̄·C̄·D + Ā·B̄·C·D̄ + Ā·B·C·D̄ + Ā·B·C·D + A·B·C·D̄ + A·B·C·D
Group= Ā·B̄·C̄·(D̄+D) + Ā·B̄·C·D̄ + Ā·B·C·(D̄+D) + A·B·C·(D̄+D)
Simplify= Ā·B̄·C̄ + Ā·B̄·C·D̄ + Ā·B·C + A·B·C
Group= Ā·B̄·(C̄ + C·D̄) + B·C·(Ā + A) = Ā·B̄·(C̄+D̄) + B·C
F₁ = Ā·B̄ + B·C   (reduced from 7 minterms to 2 terms, 6 gates → 2 gates)
Why minimize? The canonical SOP for example 3.7 requires 7 three-input AND gates + 1 seven-input OR gate + NOT gates = ~15 gates. The minimal expression Ā·B̄ + B·C needs just 2 AND gates + 1 OR gate + 2 NOT gates = 5 gates. That is a 3× reduction in silicon area and power.

📋 Quick Reference

TopicKey Rule
ANDY = A·B — HIGH only when all inputs HIGH
ORY = A+B — HIGH when any input HIGH
NOTY = Ā — unary complement
NANDY = A·B̄ = Ā+B̄ — universal gate (LOW only when all inputs HIGH)
NORY = A+B̄ = Ā·B̄ — universal gate (HIGH only when all inputs LOW)
XORY = A⊕B — HIGH when inputs differ
De Morgan 1A·B̄ = Ā + B̄ (complement AND = OR of complements)
De Morgan 2A+B̄ = Ā · B̄ (complement OR = AND of complements)
AbsorptionA + A·B = A   |   A·(A+B) = A
ConsensusA + Ā·B = A + B   |   A·(Ā+B) = A·B
Minterm mᵢAND term — complement variable if column = 0; for rows where F = 1
Maxterm MᵢOR term — complement variable if column = 1; for rows where F = 0
SOP → POSSwap Σ↔Π and use the missing minterm numbers
DualitySwap + ↔ · and 0 ↔ 1; every theorem has a dual that is automatically true
Coming next — DE-04: Simplification of Boolean Functions — Karnaugh maps from 2 to 6 variables, don’t-care conditions, NOR implementation with 0-grouping, and the Quine-McCluskey tabular method.
Scroll to Top