🔒
Pro Content
Subscribe to access all 69 OCR H446 A Level lessons.
£7.99/month
or £59/year
Subscribe now →
🔒 Pro · Component 1 · 1.4.3 Boolean Algebra
1.4.3c Simplification Using Karnaugh Maps
OCR H446 · A Level Computer Science · ~15 min read
Notes
Video
Slides
Worksheet
Quiz

What is a Karnaugh Map?

A Karnaugh map (K-map) is a visual method for simplifying Boolean expressions. It arranges all possible input combinations in a grid where adjacent cells differ by exactly one variable (Gray code ordering). By grouping 1s together, you can read off a simplified Sum of Products (SOP) expression directly — without applying algebraic laws.

K-maps are faster and less error-prone than algebraic simplification for expressions with 2–4 variables.

2-Variable K-Map

A 2-variable K-map (inputs A and B) has 4 cells:

B=0
B=1
A=0
m0
m1
A=1
m2
m3

Each cell corresponds to a minterm. Enter 0 or 1 from your truth table, then group the 1s.

3-Variable K-Map

A 3-variable K-map (inputs A, B, C) has 8 cells. The column order uses Gray code (00, 01, 11, 10) so adjacent cells differ by one bit:

A \ BC
00
01
11
10
0
m0
m1
m3
m2
1
m4
m5
m7
m6

4-Variable K-Map

A 4-variable K-map (A, B, C, D) has 16 cells. Both rows and columns use Gray code:

AB \ CD
00
01
11
10
00
m0
m1
m3
m2
01
m4
m5
m7
m6
11
m12
m13
m15
m14
10
m8
m9
m11
m10

Grouping Rules

  • Groups must contain only 1s (no 0s).
  • Group sizes must be a power of 2: 1, 2, 4, 8, 16.
  • Groups must be rectangular (including wrap-around: the map is a torus — top wraps to bottom, left wraps to right).
  • Make groups as large as possible — larger groups → more variables cancel → simpler expression.
  • Every 1 must be covered by at least one group.
  • Groups may overlap — use the same 1 in multiple groups if it makes groups larger.
  • Use the minimum number of groups needed to cover all 1s.

Reading a Group

For each group, identify which variables are the same across ALL cells in the group. Variables that change within the group are eliminated. The product term uses only the constant variables.

  • Variable is 0 in all cells of group → use it complemented (¬A)
  • Variable is 1 in all cells of group → use it uncomplemented (A)
  • Variable changes → eliminate it from the term

The final simplified expression is the OR of all group terms (Sum of Products).

Worked Example

Simplify the expression with truth table: A=0,B=0,C=0 → 0; A=0,B=0,C=1 → 1; A=0,B=1,C=0 → 1; A=0,B=1,C=1 → 1; A=1,B=0,C=0 → 0; A=1,B=0,C=1 → 0; A=1,B=1,C=0 → 1; A=1,B=1,C=1 → 1

Fill the 3-variable K-map:

A \ BC
00
01
11
10
0
0
1
1
1
1
0
0
1
1

Group 1: Top row BC=01, BC=11, BC=10 (3 cells with 1 — not a power of 2). Try: {(A=0,BC=01),(A=0,BC=11),(A=0,BC=10)} → ¬A · (B+C)... Let's use power-of-2 groups:

Group 1 (size 4): The four cells where B=1 (all BC=01,11 in A=0 and BC=11,10 in A=1): B=1 in all → keep B. A varies (0 and 1) → eliminate A. C varies → eliminate C. Result: B

Group 2 (size 2): Cells (A=0,BC=01) and (A=0,BC=11): A=0 in all → ¬A. B varies → eliminate. C=1 in all → C. Result: ¬A·C

Check: Group 1 covers all B=1 cells. Group 2 covers (A=0,B=0,C=1) which wasn't in Group 1. All 1s covered.

Simplified expression: F = B + ¬A·C

Don't-Care Conditions

Sometimes certain input combinations are impossible (e.g. BCD digits only go 0–9, states 10–15 never occur). These are marked X (don't-care) in the K-map. You may treat an X as 1 (include in a group to make it larger) or 0 (ignore it) — whichever gives the simplest expression.

Exam tip: Always use the largest possible groups. A group of 4 eliminates 2 variables; a group of 8 eliminates 3. Never use groups of 3 or 5 — these are not powers of 2. Wrap-around groups are very commonly tested.
Exam tip: When reading a group, systematically check each variable: Does A stay 0? → ¬A. Does A stay 1? → A. Does A change? → eliminate A. Repeat for B, C, D. Write the product term from what remains.
⚠ Common Mistakes
  • Using groups of 3, 5, 6, 7 — invalid. Only powers of 2: 1, 2, 4, 8.
  • Forgetting wrap-around: the rightmost column is adjacent to the leftmost column, and the top row is adjacent to the bottom row.
  • Making groups too small: always try to form the largest possible group first.
  • Leaving a 1 uncovered: every 1 in the K-map must appear in at least one group.
  • Reading a term incorrectly: check ALL cells in the group before eliminating a variable, not just two of them.
✓ Notes completed!
Video coming soon
Click to advance · Arrow keys also work
Click slide or press arrow keys to navigate

Worksheet — 1.4.3c Karnaugh Maps

8 questions · 23 marks · instantly marked

Q1What is the purpose of a Karnaugh map?[2 marks]
✓ Mark scheme
A Karnaugh map is a visual/graphical method for simplifying Boolean expressions [1]. It arranges all input combinations in a grid where adjacent cells differ by one variable (Gray code), allowing groups of 1s to be identified and simplified into a minimal Sum of Products (SOP) expression [1].
Q2State three rules that must be followed when forming groups in a K-map.[3 marks]
✓ Mark scheme
Any three of: Groups must contain only 1s (no 0s) [1]. Group sizes must be a power of 2 (1, 2, 4, 8, 16) [1]. Groups must be rectangular (or wrap-around) [1]. Groups should be as large as possible [1]. Every 1 must be in at least one group [1]. Groups may overlap [1]. Use the minimum number of groups needed [1].
Q3Why is Gray code ordering used for K-map columns and rows rather than binary ordering (00, 01, 10, 11)?[2 marks]
✓ Mark scheme
Gray code ordering (00, 01, 11, 10) ensures that adjacent cells in the K-map differ by exactly one variable [1]. This means physically adjacent cells in the grid represent minterms that differ in exactly one input — so grouping them eliminates exactly one variable, giving a valid simplification. Binary ordering (00, 01, 10, 11) would not have this property (10 and 01 are adjacent but differ in two bits) [1].
Q4A 4-variable K-map group contains 4 cells where: A=0 in all, B varies, C=1 in all, D varies. Write the product term for this group.[2 marks]
✓ Mark scheme
A=0 (constant) → ¬A. B varies → eliminate B. C=1 (constant) → C. D varies → eliminate D [1]. Product term: ¬A · C [1]. The group of 4 eliminates 2 variables (B and D), leaving only 2 variables in the product term.
Q5Explain what "wrap-around" means in a K-map and give an example of a valid wrap-around group.[3 marks]
✓ Mark scheme
Wrap-around means the K-map is treated as if it forms a torus (donut shape): the rightmost column is adjacent to the leftmost column, and the top row is adjacent to the bottom row [1]. This is valid because these cells also differ by exactly one variable (Gray code ensures this) [1]. Example: in a 4-variable map, the four corner cells {m0,m2,m8,m10} form a valid group of 4 — each pair of opposite corners is connected through wrap-around on both axes [1].
Q6Explain don't-care conditions and how they are used in K-map simplification. Give an example of where they might arise.[4 marks]
✓ Mark scheme
Don't-care conditions (marked X) represent input combinations that can never occur in practice (impossible states) [1]. Since they can never occur, the output doesn't matter — we can treat them as 0 or 1 whichever is more convenient [1]. In K-map simplification, X can be treated as 1 to create or extend a group, making it larger and giving a simpler expression, or ignored (treated as 0) if including them provides no benefit [1]. Example: a circuit that decodes Binary Coded Decimal (BCD) digits — only inputs 0000–1001 (0–9) are valid; inputs 1010–1111 (10–15) never occur and are marked as don't-cares [1].
Q7Why is simplification of Boolean expressions important in digital circuit design? Give two reasons.[4 marks]
✓ Mark scheme
Two reasons, 2 marks each: (1) Fewer logic gates are required [1] — fewer gates reduces the cost of manufacturing the circuit and the physical space (chip area) needed [1]. (2) Simpler circuits are faster [1] — fewer gate propagation delays means signals travel through the circuit more quickly, important for high-speed processors [1]. (Other valid: lower power consumption — fewer gates consume less electricity; easier maintenance/fault diagnosis; reduced noise/error rate).
Q8How many variables does a group of 8 cells eliminate in a 4-variable K-map? Explain your reasoning.[3 marks]
✓ Mark scheme
A group of 8 eliminates 3 variables [1]. Reasoning: a 4-variable map has 16 cells total. A group of 8 = 2³ means 3 variables change across the group [1]. When a variable changes across all cells in a group, it is eliminated — so 3 variables are removed, leaving only 4−3=1 variable in the final product term [1]. A group of 8 produces a single-literal term (e.g. just B or just ¬C).
Topic Quiz
1 of 15
You scored
out of 15
🎯

Mini Test — 1.4.3c Karnaugh Maps

  • 10 questions · 10 marks · 10 minutes
  • 5 MCQ + 5 short answer
Card 1 of 15
Click to reveal
🎉
Complete!
TermDefinition
← 1.4.3b Boolean Algebra 1.4.3 Boolean Algebra Next: 1.4.3d Adders & ALU →