Skip to content
Topic 04 8 min read

Boolean Algebra & Logic Circuits

Boolean Algebra and Logic Circuits

Boolean algebra handles two values, 0 and 1, with NOT, AND and OR. Its laws and DeMorgan’s theorems rewrite expressions without changing truth tables, and the resulting function maps directly to logic gates. This chapter covers the seven common gates, sum-of-products and product-of-sums forms, simplification, and the division between combinational circuits and clocked sequential circuits built from flip-flops and registers.

01

Constants, variables and the three operations

  • Boolean algebra uses two values: 0 (false) and 1 (true).
  • A constant is fixed at 0 or 1; a variable such as A or B takes either value.
  • NOT (A′ or ¬A) inverts: 0 → 1 and 1 → 0.
  • AND (A·B or AB) is 1 only when both inputs are 1.
  • OR (A+B) is 1 when at least one input is 1; 1+1 = 1, not 2.
  • Precedence is NOT, then AND, then OR; brackets override; n variables give 2ⁿ truth-table rows.
Constants, variables and the three operations
A B | A' | A·B | A+B
0 0 | 1  |  0  |  0
0 1 | 1  |  0  |  1
1 0 | 0  |  0  |  1
1 1 | 0  |  1  |  1
02

Boolean laws and identities

  • Identity: A+0 = A, A·1 = A. Null: A+1 = 1, A·0 = 0.
  • Idempotent: A+A = A, A·A = A. Complement: A+A′ = 1, A·A′ = 0.
  • Double negation: (A′)′ = A.
  • Commutative and associative laws allow reordering and regrouping of OR and AND terms.
  • Distributive: A(B+C) = AB+AC and A+BC = (A+B)(A+C).
  • Absorption: A+AB = A, A(A+B) = A. Consensus: AB+A′C+BC = AB+A′C.
  • Every identity is proved by checking all input rows of a truth table.
Boolean laws and identities
LawOR formAND form
IdentityA + 0 = AA · 1 = A
Null (domination)A + 1 = 1A · 0 = 0
IdempotentA + A = AA · A = A
ComplementA + A′ = 1A · A′ = 0
Double negation(A′)′ = A—
CommutativeA + B = B + AA · B = B · A
Associative(A + B) + C = A + (B + C)(A · B) · C = A · (B · C)
DistributiveA + BC = (A + B)(A + C)A(B + C) = AB + AC
AbsorptionA + AB = AA(A + B) = A
ConsensusAB + A′C + BC = AB + A′C(A + B)(A′ + C)(B + C) = (A + B)(A′ + C)
03

DeMorgan’s theorems and worked simplification

  • (A·B)′ = A′ + B′: the complement of an AND is the OR of the complements.
  • (A+B)′ = A′·B′: the complement of an OR is the AND of the complements.
  • General form: (ABC…)′ = A′+B′+C′+… and (A+B+C…)′ = A′B′C′…
  • Rule: complement each variable, swap · with +, and remove the outer bar.
  • NAND gives (AB)′ and NOR gives (A+B)′; either gate can build NOT, AND and OR.
  • Do not write (A+B)′ as A′+B′; the operator must change.
DeMorgan’s theorems and worked simplification
Simplify F = (A'B + AB')'

Step 1  (X + Y)' = X'Y'          DeMorgan
        F = (A'B)' · (AB')'

Step 2  (XY)' = X' + Y'          DeMorgan
        F = (A + B') · (A' + B)

Step 3  expand
        F = AA' + AB + A'B' + B'B

Step 4  AA' = 0, B'B = 0
        F = AB + A'B'            (XNOR)

Check: 00 -> 1, 01 -> 0, 10 -> 0, 11 -> 1
04

Logic gates and their truth tables

  • AND: output 1 only when all inputs are 1.
  • OR: output 1 when any input is 1.
  • NOT: single-input inverter; a bubble on an input or output marks inversion.
  • NAND = AND followed by NOT; NOR = OR followed by NOT; both are universal gates.
  • XOR: output 1 when inputs differ. XNOR: output 1 when inputs match.
  • XOR gives the sum bit of a half adder; XNOR detects equality.
  • Truth tables define logic; propagation delay and fan-out are electrical limits.
Truth table for the seven common gates
ABNOT AANDORNANDNORXORXNOR
001001101
011011010
100011010
110110001
05

SOP, POS and simplification

  • Literal: a variable or its complement. A product term ANDs literals; a sum term ORs them.
  • Minterm: a product term containing every variable once; it is 1 for exactly one row.
  • Canonical SOP: OR of the minterms where F = 1; AND gates feed an OR gate.
  • Maxterm: a sum term containing every variable once; it is 0 for exactly one row.
  • Canonical POS: AND of the maxterms where F = 0; OR gates feed an AND gate.
  • Example: F(A,B) = Σm(1,2,3) = A′B + AB′ + AB = A + B; ΠM(0) = (A + B).
  • Karnaugh map: group adjacent 1s in 1, 2, 4 or 8 cells; drop the variable that changes inside a group, then verify against the truth table.
SOP, POS and simplification
F(A,B) = Σm(1,2,3)
       = A'B + AB' + AB
       = A'B + A(B' + B)
       = A'B + A
       = A + B

POS: F = ΠM(0) = (A + B)

K-map (A rows, B columns):
        B=0   B=1
A=0      0     1
A=1      1     1

Group the two 1s in column B=1 -> B
Group the two 1s in row A=1    -> A
F = A + B
06

Combinational versus sequential circuits

  • Combinational: output depends only on present inputs; no memory; same inputs give the same output after propagation delay.
  • Sequential: output depends on present inputs and stored state, so past inputs can affect the present output.
  • SR flip-flop: set (S=1) forces Q=1, reset (R=1) forces Q=0; S=R=1 is invalid in the basic NOR latch.
  • D flip-flop: Q(next) = D at the active clock edge. JK flip-flop toggles when J=K=1.
  • Register: n flip-flops sharing a clock, storing an n-bit word.
  • Accumulator: a register plus adder feedback; it holds a running arithmetic result.
  • Clock period must cover clock-to-Q delay, the longest combinational delay, and flip-flop setup time.
Combinational versus sequential circuits
PropertyCombinationalSequential
Output depends onPresent inputs onlyPresent inputs and stored state
MemoryNoneFlip-flops or latches
ClockNot requiredUsually clocked
ExamplesAdder, multiplexer, decoder, comparatorFlip-flop, register, counter, FSM
BehaviourSame inputs give the same outputOutput can depend on input history
Design limitLongest propagation delayClock period and setup/hold times

Exam points

  • A·0 = 0 and A+1 = 1 are the null laws; A+A′ = 1 and A·A′ = 0 are the complement laws.
  • DeMorgan: (AB)′ = A′+B′ and (A+B)′ = A′B′.
  • NAND and NOR are universal gates: either alone can implement NOT, AND and OR.
  • XOR outputs 1 only when its inputs differ; XNOR outputs 1 when they match.
  • SOP is an OR of AND terms; POS is an AND of OR terms.
  • Combinational output depends on present inputs only; sequential output also depends on state stored in flip-flops.

Key terms

Minterm
A product term containing every variable of the function exactly once, in true or complemented form; it is 1 for exactly one input combination.
Universal gate
A gate type, specifically NAND or NOR, from which NOT, AND and OR can be built, so any Boolean function can be realized.
Flip-flop
A bistable sequential circuit that stores one bit and changes state in response to defined inputs or a clock edge; it is the building block of registers.

Check yourself

Quick check

0 / 2 answered
01

Which expression is equivalent to (A + B)′?

02

Which circuit is sequential?

IT Fundamentals · Computer organization, memory, number systems, Boolean algebra, microprocessors, software, and MS Office.