Skip to content

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)
#ABf
0FALSEFALSEFALSE
1FALSETRUEFALSE
2TRUEFALSETRUE
3TRUETRUETRUE

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

A \ B
0
1
0
0m0
0m1
1
1m2
1m3
  1. cells m2, m3A
A · Derived A. Exactly equivalent on every assignment.

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)
#ABf
0FALSEFALSETRUE
1FALSETRUEFALSE
2TRUEFALSETRUE
3TRUETRUEFALSE

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

A \ B
0
1
0
1m0
0m1
1
1m2
0m3
  1. cells m0, m2NOT B
NOT B · Derived NOT B. Exactly equivalent on every assignment.

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)
#ABf
0FALSEFALSEFALSE
1FALSETRUETRUE
2TRUEFALSEFALSE
3TRUETRUETRUE

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

A \ B
0
1
0
0m0
1m1
1
0m2
1m3
  1. cells m1, m3B
B · Derived B. Exactly equivalent on every assignment.

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)
#ABf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSEFALSE
3TRUETRUEFALSE

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

A \ B
0
1
0
1m0
1m1
1
0m2
0m3
  1. cells m0, m1NOT A
NOT A · Derived NOT A. Exactly equivalent on every assignment.

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)
#ABf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUEFALSE

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

A \ B
0
1
0
1m0
1m1
1
1m2
0m3
  1. cells m0, m1NOT A
  2. cells m0, m2NOT B
NOT A OR NOT B · Derived NOT A OR NOT B. Exactly equivalent on every assignment.

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)
#ABf
0FALSEFALSEFALSE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUETRUE

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

A \ B
0
1
0
0m0
1m1
1
1m2
1m3
  1. cells m2, m3A
  2. cells m1, m3B
A OR B · Derived A OR B. Exactly equivalent on every assignment.

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)
#ABf
0FALSEFALSEFALSE
1FALSETRUEFALSE
2TRUEFALSEFALSE
3TRUETRUETRUE

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

A \ B
0
1
0
0m0
0m1
1
0m2
1m3
  1. cells m3A AND B
A AND B · Derived A AND B. Exactly equivalent on every assignment.

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)
#ABf
0FALSEFALSETRUE
1FALSETRUEFALSE
2TRUEFALSEFALSE
3TRUETRUETRUE

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

A \ B
0
1
0
1m0
0m1
1
0m2
1m3
  1. cells m0NOT A AND NOT B
  2. cells m3A AND B
(NOT A AND NOT B) OR (A AND B) · Derived (NOT A AND NOT B) OR (A AND B). Exactly equivalent on every assignment.

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)
#ABf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUETRUE

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

A \ B
0
1
0
1m0
1m1
1
1m2
1m3
  1. cells m0, m1, m2, m3TRUE
TRUE · Derived TRUE. Exactly equivalent on every assignment.

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)
#ABf
0FALSEFALSETRUE
1FALSETRUEFALSE
2TRUEFALSETRUE
3TRUETRUETRUE

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

A \ B
0
1
0
1m0
0m1
1
1m2
1m3
  1. cells m2, m3A
  2. cells m0, m2NOT B
A OR NOT B · Derived A OR NOT B. Exactly equivalent on every assignment.

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

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.