Page 2
Karnaugh Maps
A Karnaugh map (K-map) is a grid for simplifying a Boolean expression by eye. It holds the same information as a truth table, but arranges it so that simplifications appear as blocks of adjacent 1s.
Why the order is 00, 01, 11, 10
The rows and columns are labelled in Gray code — only one bit changes between neighbours (00 → 01 → 11 → 10). That is what makes physically adjacent cells differ by exactly one variable, so a pair of adjacent 1s always means one variable can be removed.
2 variables
| A \ B | 0 | 1 |
|---|---|---|
| 0 | m0 | m1 |
| 1 | m2 | m3 |
3 variables
| A \ BC | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | m0 | m1 | m3 | m2 |
| 1 | m4 | m5 | m7 | m6 |
4 variables
| 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 |
Edges wrap around: the left and right columns are adjacent, and the top and bottom rows are adjacent (and all four corners are mutually adjacent).
Grouping rules
- Groups may contain only 1s.
- Each group must be a rectangle whose size is a power of two (1, 2, 4, 8, 16).
- Make groups as large as possible and use as few as possible.
- Groups may overlap, and may wrap around the edges.
- Every 1 must be covered by at least one group.
- A group of 2 removes one variable, a group of 4 removes two, a group of 8 removes three.
To read a group: keep the variables that stay constant across it (write a variable plain if it is 1 throughout, complemented if it is 0 throughout); drop any variable that changes. OR the groups together to get the simplified expression (sum-of-products form).
Worked example
Simplify the function below, true for minterms 0, 1, 4 and 5.
1 — Truth table
| A | B | C | F |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 |
2 — Plot & group
| A \ BC | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 |
One group of four (highlighted).
3 — Read the group
Across the group of four: A changes (0 and 1) → drop it; C changes (columns 00 and 01) → drop it; B is 0 throughout → keep it complemented. So:
F = ~BThe same answer you would get algebraically — but found visually in one step.
Try it yourself
The map is filled in from the expression. Click the 1s to form a group (a power-of-two rectangle — edges wrap around), press Add group, repeat until every 1 is covered, then read off or check the simplified expression.
Expression on the map:
Click cells that are 1 to build a group.
Groups (hover to highlight, click to remove):
Expression from your groups: