Lesson 17 +30 XP

Boolean Algebra, Boolean Functions & Logic Gates

1. Boolean Algebra

A Boolean algebra (B, +, ·, ′, 0, 1) is a set B with two binary operations + (OR / join) and · (AND / meet), a unary complement ′ and two distinct elements 0, 1, satisfying for all a, b, c (Huntington's postulates):

PostulateSum formProduct form
Commutativea + b = b + aa · b = b · a
Distributivea + (b · c) = (a + b) · (a + c)a · (b + c) = a·b + a·c
Identitya + 0 = aa · 1 = a
Complementa + a′ = 1a · a′ = 0

Equivalently (Lesson 16), a Boolean algebra is a complemented distributive lattice. Examples: ({0, 1}, OR, AND, NOT); (P(S), ∪, ∩, complement); D₃₀ with lcm, gcd, 30/d.

2. Laws Derived from the Postulates

LawStatement
Double complement(a′)′ = a
Idempotenta + a = a, a · a = a
Dominancea + 1 = 1, a · 0 = 0
Associative(a + b) + c = a + (b + c)
Absorptiona + a·b = a, a·(a + b) = a
Simplificationa + a′b = a + b, a(a′ + b) = ab
De Morgan(a + b)′ = a′·b′, (a·b)′ = a′ + b′
Consensusab + a′c + bc = ab + a′c

Proof of absorption a + ab = a·1 + a·b = a(1 + b) = a·1 = a. ∎ Proof of simplification a + a′b = (a + a′)(a + b) = 1·(a + b) = a + b. ∎

Duality: interchange + ↔ · and 0 ↔ 1; every identity's dual is also an identity.

3. Boolean Functions

A Boolean function of degree n is f : {0, 1}ⁿ → {0, 1}. There are 22ⁿ of them-16 functions of two variables.

Example. F(A, B) = A′B′: F(0, 0) = 1, F(0, 1) = 0, F(1, 0) = 0, F(1, 1) = 0 (this is NOR).

Canonical forms

  • Minterm (for a row): product of all variables, each complemented if its value is 0. Row 101 → AB′C = m₅.
  • Maxterm: sum of all variables, each complemented if its value is 1. Row 101 → A′ + B + C′ = M₅.
  • Sum of products (SOP / DNF): F = Σm(rows where F = 1).
  • Product of sums (POS / CNF): F = ΠM(rows where F = 0).

Solved. F(A, B, C) = 1 exactly on rows 000, 010, 011, 110, 111: F = Σm(0, 2, 3, 6, 7) = A′B′C′ + A′BC′ + A′BC + ABC′ + ABC = ΠM(1, 4, 5).

Algebraic expansion. Write F = A + B′C in canonical SOP: A = A(B + B′)(C + C′) = ABC + ABC′ + AB′C + AB′C′; B′C = (A + A′)B′C = AB′C + A′B′C. F = Σm(1, 4, 5, 6, 7).

4. Logic Gates

Logic gates with symbols and truth tablesLogic gates with symbols and truth tables

GateExpressionOutput 1 when
NOTA′A = 0
ANDA·Ball inputs 1
ORA + Bsome input 1
NAND(A·B)′not all inputs 1
NOR(A + B)′all inputs 0
XORA ⊕ B = AB′ + A′Binputs differ
XNOR(A ⊕ B)′inputs equal

NAND and NOR are universal: NOT A = A NAND A; A·B = (A NAND B) NAND (A NAND B); A + B = (A NAND A) NAND (B NAND B).

Half adder: sum S = A ⊕ B, carry C = A·B.

🎯 END-TERM EXAM PREP

📝 IPU End-Term Exam Corner (5-10 Marks)

  • Q1. Define a Boolean algebra. Prove the absorption law and De Morgan's law from the postulates. (10 Marks)
  • Q2. Express F(A, B, C) = A + B′C in canonical SOP and POS form. (5 Marks) → Σm(1, 4, 5, 6, 7) = ΠM(0, 2, 3).
  • Q3. Show that NAND is a universal gate. (5 Marks)