15.2 Boolean Algebra and Logic Circuits

Bulk view disabled for Guests. View lessons individually.

Boolean Algebra, De Morgan's Laws and Karnaugh Maps

Notation used here. A dot means AND (A.B), a plus means OR (A+B), and a bar or apostrophe means NOT (A'). 1 is TRUE and 0 is FALSE.

1. Why Simplify a Boolean Expression?

Every logic expression corresponds to a circuit of gates. A simpler expression means fewer gates, which means lower cost, less power, less heat and a faster circuit. Simplification is therefore an engineering task, not just an algebraic exercise.

2. The Laws of Boolean Algebra

LawAND formOR form
IdentityA.1 = AA+0 = A
Null / AnnulmentA.0 = 0A+1 = 1
IdempotentA.A = AA+A = A
Inverse / ComplementA.A' = 0A+A' = 1
CommutativeA.B = B.AA+B = B+A
Associative(A.B).C = A.(B.C)(A+B)+C = A+(B+C)
DistributiveA.(B+C) = A.B + A.CA+(B.C) = (A+B).(A+C)
AbsorptionA.(A+B) = AA+(A.B) = A
Double negation(A')' = A

3. De Morgan's Laws

(A.B)' = A' + B'

(A+B)' = A' . B'

How to apply them, in three steps:

  1. Change the operator — AND becomes OR, OR becomes AND.
  2. Invert each individual term.
  3. Remove the bar that spanned the whole expression.

Proving De Morgan with a truth table

ABA.B(A.B)'A'B'A'+B'
0001111
0101101
1001011
1110000

The two bold columns are identical, which proves the law. Producing a truth table like this is a valid and often-requested way to demonstrate equivalence.

Invert every term, and change the operator. The most common error is writing (A.B)' = A'.B' — changing the terms but forgetting the operator. Both must change.

4. Worked Simplifications

Example 1

Simplify A.B + A.B'

A.B + A.B'Start
A.(B + B')Distributive law — factor out A
A.1Inverse law: B + B' = 1
AIdentity law

Four gates reduce to a plain wire.

Example 2

Simplify (A + B).(A + B')

A + (B.B')Distributive law (OR form)
A + 0Inverse law
AIdentity law

Example 3 — using De Morgan

Simplify (A' + B)'

(A')' . B'De Morgan: OR becomes AND, invert each term
A.B'Double negation

5. Karnaugh Maps

A Karnaugh map (K-map) simplifies an expression visually, avoiding long algebraic manipulation. It is a truth table redrawn so that adjacent cells differ by only one variable.

The critical detail: the column and row labels use Gray code order — 00, 01, 11, 10not binary counting order. Only one bit changes between neighbours, and that is what makes grouping valid.

Worked example

Simplify A'.B + A.B using a two-variable K-map. Write a 1 in each cell where the expression is true:

 B = 0B = 1
A = 001
A = 101

The two 1s form a group of 2. Within that group B is always 1, while A changes from 0 to 1. The variable that changes is eliminated, so the simplified expression is simply B.

Rules for grouping

  • Group only 1s, never 0s
  • Groups must contain 1, 2, 4, 8… cells — always a power of 2
  • Groups must be rectangular: horizontal or vertical, never diagonal
  • Make each group as large as possible — larger groups remove more variables
  • Groups may overlap
  • Groups may wrap around the edges of the map
  • Every 1 must be in at least one group
  • In each group, eliminate the variables that change and keep those that stay constant

A three-variable map

For three variables the map is 2 × 4, with the pair BC across the top in Gray code order:

 BC = 00BC = 01BC = 11BC = 10
A = 00110
A = 10110

The group of four spans both values of A and both values of B, so both are eliminated. C is 1 throughout, giving C.

Label the map in Gray code. Writing the columns as 00, 01, 10, 11 makes adjacent cells differ by two bits, so any grouping drawn on it is invalid. This single mistake invalidates the whole answer.

6. Exam Focus

Show your working and name the laws. Simplification questions award marks for the intermediate steps, not only the final expression. State which law justifies each line.
Take the largest possible groups. Answers that use four groups of two where two groups of four exist are not fully simplified and lose marks, even though the expression is logically correct.
Remember the wrap-around. Groups spanning the left and right edges, or top and bottom, are legitimate and are frequently the intended answer. Candidates routinely miss them.

Quick self-check

  • State both of De Morgan's laws.
  • Simplify A.B + A.B' + A'.B.
  • Apply De Morgan to (A.B' + C)'.
  • Why must K-map labels use Gray code?
  • What size must a K-map group be, and why can a group of three never be valid?
  • State two practical benefits of simplifying a logic circuit.