Karnaugh Maps
Introduction
Learn how to simplify Boolean expressions visually using Karnaugh maps: the elegant grid-based method that replaces tedious algebraic manipulation.
What Is a Boolean Expression?
A Boolean expression is a mathematical statement that evaluates to either true (1) or false (0). It combines variables using three fundamental operations:
The Simplification Problem
Boolean expressions can be simplified using algebraic laws (De Morgan's, distribution, absorption). But with three or more variables, algebraic simplification becomes error-prone and tedious. You may not even know when you have reached the simplest form.
What Is a Karnaugh Map?
A Karnaugh map is a grid of cells where each cell represents one row of a truth table. The rows and columns are labeled with variable values arranged in Gray code order, so that adjacent cells differ by exactly one variable.
Why Gray Code Order?
The key insight behind K-maps is that adjacent cells differ by exactly one variable. This means grouping adjacent 1s in the map corresponds to eliminating that variable from the expression.
Truth Table → K-Map
Every truth table has a direct mapping to a Karnaugh map. Each row of the truth table corresponds to exactly one cell in the K-map grid.
The Core Rule: Grouping
The fundamental operation in a K-map is grouping adjacent 1s. Each group eliminates variables, producing a simpler product term.
Group Size → Simplification
Each doubling of group size eliminates one variable from the product term. In an \(n\)-variable K-map:
| Group Size | Variables Eliminated | Variables Remaining | Term Complexity |
|---|---|---|---|
| 1 cell | 0 | \(n\) | Full minterm |
| 2 cells | 1 | \(n - 1\) | Simpler |
| 4 cells | 2 | \(n - 2\) | Much simpler |
| 8 cells | 3 | \(n - 3\) | Very simple |
| \(2^n\) cells | \(n\) | 0 | \(F = 1\) |
K-Map vs Boolean Algebra
| Feature | K-Map | Boolean Algebra |
|---|---|---|
| Method | Visual pattern recognition | Symbolic manipulation |
| Guarantee | Always finds minimal SOP | May miss simplifications |
| Speed (2-4 vars) | Fast | Moderate |
| Scalability | Best for \(\leq 4\) variables | Any number of variables |
| Error-prone? | Low (visual check) | Higher (algebraic steps) |
How to Use a K-Map
Example 1: 2-Variable K-Map
Simplify: \(F(A,B) = \sum m(1, 2, 3)\)
Example 2: 3-Variable K-Map
Simplify: \(F(A,B,C) = \sum m(0, 2, 4, 6)\)
Example 3: Multiple Groups
Simplify: \(F(A,B,C) = \sum m(1, 3, 5, 7)\)
The 4-Variable K-Map
With four variables \(A, B, C, D\), the K-map becomes a 4×4 grid. Both rows AND columns use Gray code ordering. Wraparound applies in all directions.
Example 4: 4-Variable K-Map
Simplify: \(F(A,B,C,D) = \sum m(0, 2, 8, 10)\)
Common Mistakes to Avoid
K-Map Summary
| Variables | Grid Size | Total Cells | Max Group |
|---|---|---|---|
| 2 | \(2 \times 2\) | 4 | 4 |
| 3 | \(2 \times 4\) | 8 | 8 |
| 4 | \(4 \times 4\) | 16 | 16 |
Question 1 of 5
In a Karnaugh map, which numbering system is used to label the rows and columns?
Question 2 of 5
Which of the following is a valid group size in a Karnaugh map?
Question 3 of 5
In a 3-variable K-map, a group of 4 adjacent cells eliminates how many variables?
Question 4 of 5
On a 4-variable K-map, the four corner cells (m0, m2, m8, m10) form a valid group because:
Question 5 of 5
Using a 2-variable K-map for \(F(A,B) = \sum m(1,3)\), what is the simplified expression?