Karnaugh map exercises with answers: 2 variables
Ten functions given as minterm lists over A and B, to be read off a two-by-two Karnaugh map. Draw the map, circle the groups, write the grouped sum of products and compare with the map under the problem, which marks the cells and derives the same expression.
With two variables the map has four cells: A chooses the row and B the column, and the cell numbers are the truth-table rows, m0 to m3, with A as the most significant bit. A pair of adjacent 1-cells drops the variable that changes between them; a single 1-cell with no neighbour keeps both variables; all four cells together give TRUE. Groups may overlap, and a cell may be used twice.
The solutions name each group and the variable it drops, and give the result in the engine's word syntax. Any equivalent form is accepted: NOT A OR NOT B and NAND(A, B) describe the same three cells. Where no pair exists, as in Σm(A, B; 0, 3), the map has two isolated cells and the sum of two full minterms is the answer; that function is the biconditional.
1. Group the Karnaugh map of Σm(A, B; 2, 3) and write the result. Σm(A, B; 2, 3)
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | FALSE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
Σm(A, B; 2, 3) Classification: contingent
- cells m2, m3
A
Cells m2 and m3 form the bottom row, A = TRUE with B changing, so B drops and the result is A.
2. Group the Karnaugh map of Σm(A, B; 0, 2) and write the result. Σm(A, B; 0, 2)
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | FALSE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | FALSE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
Σm(A, B; 0, 2) Classification: contingent
- cells m0, m2
NOT B
Cells m0 and m2 form the left column, B = FALSE with A changing: A drops, result NOT B.
3. Group the Karnaugh map of Σm(A, B; 1, 3) and write the result. Σm(A, B; 1, 3)
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | FALSE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
Σm(A, B; 1, 3) Classification: contingent
- cells m1, m3
B
The right column, B = TRUE in both cells: B.
4. Group the Karnaugh map of Σm(A, B; 0, 1) and write the result. Σm(A, B; 0, 1)
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | FALSE |
| 3 | TRUE | TRUE | FALSE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
Σm(A, B; 0, 1) Classification: contingent
- cells m0, m1
NOT A
The top row, A = FALSE in both cells: NOT A.
5. Group the Karnaugh map of Σm(A, B; 0, 1, 2) and write the result. Σm(A, B; 0, 1, 2)
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | FALSE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
Σm(A, B; 0, 1, 2) Classification: contingent
- cells m0, m1
NOT A - cells m0, m2
NOT B
Two pairs sharing m0: the top row gives NOT A and the left column gives NOT B, so NOT A OR NOT B, which is NAND(A, B). Only m3 stays 0.
6. Group the Karnaugh map of Σm(A, B; 1, 2, 3) and write the result. Σm(A, B; 1, 2, 3)
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
Σm(A, B; 1, 2, 3) Classification: contingent
- cells m2, m3
A - cells m1, m3
B
Two pairs sharing m3: the bottom row gives A and the right column gives B: A OR B.
7. Group the Karnaugh map of Σm(A, B; 3) and write the result. Σm(A, B; 3)
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | FALSE |
| 2 | TRUE | FALSE | FALSE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
Σm(A, B; 3) Classification: contingent
- cells m3
A AND B
A single cell with no 1 beside it: nothing drops and the result is the full minterm A AND B.
8. Group the Karnaugh map of Σm(A, B; 0, 3) and write the result. Σm(A, B; 0, 3)
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | FALSE |
| 2 | TRUE | FALSE | FALSE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
Σm(A, B; 0, 3) Classification: contingent
- cells m0
NOT A AND NOT B - cells m3
A AND B
m0 and m3 are diagonal, not adjacent, so there is no pair: two single cells, (NOT A AND NOT B) OR (A AND B), the biconditional A <-> B.
9. Group the Karnaugh map of Σm(A, B; 0, 1, 2, 3) and write the result. Σm(A, B; 0, 1, 2, 3)
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
Σm(A, B; 0, 1, 2, 3) Classification: tautology
- cells m0, m1, m2, m3
TRUE
All four cells are 1: one group of four drops both variables and the result is TRUE; the classification says tautology.
10. Group the Karnaugh map of Σm(A, B; 0, 2, 3) and write the result. Σm(A, B; 0, 2, 3)
| # | A | B | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | FALSE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
Σm(A, B; 0, 2, 3) Classification: contingent
- cells m2, m3
A - cells m0, m2
NOT B
Two pairs sharing m2: the bottom row gives A and the left column gives NOT B: A OR NOT B, FALSE only in m1 (A = FALSE, B = TRUE). It is also B -> A.
Questions
What does the map's derived expression promise?
That it has no removable term and is equivalent to the function on every cell; the engine checks this exactly. It does not claim to be the shortest expression of all: it is an irreducible cover, and the exact check is what makes it trustworthy.
Related
Worked examples
Glossary
Compare
See also
- Lesson 11: Karnaugh maps (advanced, 15 min)
- Karnaugh map grouping rule: adjacent cells drop the variable that changes
- Karnaugh map (K-map): meaning and examples
- Karnaugh map solver: 2 to 4 variables, groups, SOP and POS, don’t-cares from assumptions
Practice
Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.