Skip to content

Karnaugh map exercises with answers: 4 variables

Ten functions over A, B, C and D as minterm lists, to be grouped on the four-by-four Karnaugh map. Draw the map with AB on the rows and CD on the columns in Gray-code order, circle the groups, and compare with the engine's map and derived expression under each problem.

In the engine's layout the rows are AB = 00, 01, 11, 10 and the columns CD = 00, 01, 11, 10, so the first row is m0, m1, m3, m2 and the last row is m8, m9, m11, m10. Both edges wrap: the top and bottom rows are neighbours, and so are the left and right columns, which makes the four corners m0, m2, m8, m10 one group. Groups of two, four, eight and sixteen cells drop one, two, three and four variables.

The set includes the four corners, a full row, a full column, a block of eight, a wraparound pair of rows, the classic two-group function from the worked examples, a single cell, and a ten-cell function that needs a group of eight and a group of four sharing cells. Each solution names the cells of each group, says which variables change inside it, and gives the sum of products.

1. Group the Karnaugh map of Σm(A, B, C, D; 0, 2, 8, 10) and write the result. Σm(A, B, C, D; 0, 2, 8, 10)
#ABCDf
0FALSEFALSEFALSEFALSETRUE
1FALSEFALSEFALSETRUEFALSE
2FALSEFALSETRUEFALSETRUE
3FALSEFALSETRUETRUEFALSE
4FALSETRUEFALSEFALSEFALSE
5FALSETRUEFALSETRUEFALSE
6FALSETRUETRUEFALSEFALSE
7FALSETRUETRUETRUEFALSE
8TRUEFALSEFALSEFALSETRUE
9TRUEFALSEFALSETRUEFALSE
10TRUEFALSETRUEFALSETRUE
11TRUEFALSETRUETRUEFALSE
12TRUETRUEFALSEFALSEFALSE
13TRUETRUEFALSETRUEFALSE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

Σm(A, B, C, D; 0, 2, 8, 10)

Classification: contingent

AB \ CD
00
01
11
10
00
1m0
0m1
0m3
1m2
01
0m4
0m5
0m7
0m6
11
0m12
0m13
0m15
0m14
10
1m8
0m9
0m11
1m10
  1. cells m0, m2, m8, m10NOT B AND NOT D
NOT B AND NOT D · Derived NOT B AND NOT D. Exactly equivalent on every assignment.

m0, m2, m8, m10 are the four corners, adjacent by wraparound on both edges: A and C change, B and D are FALSE throughout. Result NOT B AND NOT D.

2. Group the Karnaugh map of Σm(A, B, C, D; 0, 1, 2, 3) and write the result. Σm(A, B, C, D; 0, 1, 2, 3)
#ABCDf
0FALSEFALSEFALSEFALSETRUE
1FALSEFALSEFALSETRUETRUE
2FALSEFALSETRUEFALSETRUE
3FALSEFALSETRUETRUETRUE
4FALSETRUEFALSEFALSEFALSE
5FALSETRUEFALSETRUEFALSE
6FALSETRUETRUEFALSEFALSE
7FALSETRUETRUETRUEFALSE
8TRUEFALSEFALSEFALSEFALSE
9TRUEFALSEFALSETRUEFALSE
10TRUEFALSETRUEFALSEFALSE
11TRUEFALSETRUETRUEFALSE
12TRUETRUEFALSEFALSEFALSE
13TRUETRUEFALSETRUEFALSE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

Σm(A, B, C, D; 0, 1, 2, 3)

Classification: contingent

AB \ CD
00
01
11
10
00
1m0
1m1
1m3
1m2
01
0m4
0m5
0m7
0m6
11
0m12
0m13
0m15
0m14
10
0m8
0m9
0m11
0m10
  1. cells m0, m1, m2, m3NOT A AND NOT B
NOT A AND NOT B · Derived NOT A AND NOT B. Exactly equivalent on every assignment.

The whole first row, AB = 00, with C and D taking all four combinations: NOT A AND NOT B.

3. Group the Karnaugh map of Σm(A, B, C, D; 5, 7, 13, 15) and write the result. Σm(A, B, C, D; 5, 7, 13, 15)
#ABCDf
0FALSEFALSEFALSEFALSEFALSE
1FALSEFALSEFALSETRUEFALSE
2FALSEFALSETRUEFALSEFALSE
3FALSEFALSETRUETRUEFALSE
4FALSETRUEFALSEFALSEFALSE
5FALSETRUEFALSETRUETRUE
6FALSETRUETRUEFALSEFALSE
7FALSETRUETRUETRUETRUE
8TRUEFALSEFALSEFALSEFALSE
9TRUEFALSEFALSETRUEFALSE
10TRUEFALSETRUEFALSEFALSE
11TRUEFALSETRUETRUEFALSE
12TRUETRUEFALSEFALSEFALSE
13TRUETRUEFALSETRUETRUE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

Σm(A, B, C, D; 5, 7, 13, 15)

Classification: contingent

AB \ CD
00
01
11
10
00
0m0
0m1
0m3
0m2
01
0m4
1m5
1m7
0m6
11
0m12
1m13
1m15
0m14
10
0m8
0m9
0m11
0m10
  1. cells m5, m7, m13, m15B AND D
B AND D · Derived B AND D. Exactly equivalent on every assignment.

The central block of four, rows AB = 01 and 11 by columns CD = 01 and 11: A and C change, B = TRUE, D = TRUE throughout. Result B AND D.

4. Group the Karnaugh map of Σm(A, B, C, D; 0, 4, 8, 12) and write the result. Σm(A, B, C, D; 0, 4, 8, 12)
#ABCDf
0FALSEFALSEFALSEFALSETRUE
1FALSEFALSEFALSETRUEFALSE
2FALSEFALSETRUEFALSEFALSE
3FALSEFALSETRUETRUEFALSE
4FALSETRUEFALSEFALSETRUE
5FALSETRUEFALSETRUEFALSE
6FALSETRUETRUEFALSEFALSE
7FALSETRUETRUETRUEFALSE
8TRUEFALSEFALSEFALSETRUE
9TRUEFALSEFALSETRUEFALSE
10TRUEFALSETRUEFALSEFALSE
11TRUEFALSETRUETRUEFALSE
12TRUETRUEFALSEFALSETRUE
13TRUETRUEFALSETRUEFALSE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

Σm(A, B, C, D; 0, 4, 8, 12)

Classification: contingent

AB \ CD
00
01
11
10
00
1m0
0m1
0m3
0m2
01
1m4
0m5
0m7
0m6
11
1m12
0m13
0m15
0m14
10
1m8
0m9
0m11
0m10
  1. cells m0, m4, m8, m12NOT C AND NOT D
NOT C AND NOT D · Derived NOT C AND NOT D. Exactly equivalent on every assignment.

The whole first column, CD = 00: A and B change, result NOT C AND NOT D.

5. Group the Karnaugh map of Σm(A, B, C, D; 0, 1, 2, 4, 5, 6, 8, 9, 12, 13) and write the result. Σm(A, B, C, D; 0, 1, 2, 4, 5, 6, 8, 9, 12, 13)
#ABCDf
0FALSEFALSEFALSEFALSETRUE
1FALSEFALSEFALSETRUETRUE
2FALSEFALSETRUEFALSETRUE
3FALSEFALSETRUETRUEFALSE
4FALSETRUEFALSEFALSETRUE
5FALSETRUEFALSETRUETRUE
6FALSETRUETRUEFALSETRUE
7FALSETRUETRUETRUEFALSE
8TRUEFALSEFALSEFALSETRUE
9TRUEFALSEFALSETRUETRUE
10TRUEFALSETRUEFALSEFALSE
11TRUEFALSETRUETRUEFALSE
12TRUETRUEFALSEFALSETRUE
13TRUETRUEFALSETRUETRUE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

Σm(A, B, C, D; 0, 1, 2, 4, 5, 6, 8, 9, 12, 13)

Classification: contingent

AB \ CD
00
01
11
10
00
1m0
1m1
0m3
1m2
01
1m4
1m5
0m7
1m6
11
1m12
1m13
0m15
0m14
10
1m8
1m9
0m11
0m10
  1. cells m0, m2, m4, m6NOT A AND NOT D
  2. cells m0, m1, m4, m5, m8, m9, m12, m13NOT C
(NOT A AND NOT D) OR NOT C · Derived (NOT A AND NOT D) OR NOT C. Exactly equivalent on every assignment.

Two groups: the block of eight in columns CD = 00 and 01 gives NOT C, and the four cells m0, m2, m4, m6 (rows AB = 00 and 01, columns CD = 00 and 10, wrapping) give NOT A AND NOT D. They share m0 and m4. Result NOT C OR (NOT A AND NOT D).

6. Group the Karnaugh map of Σm(A, B, C, D; 0, 1, 4, 5, 8, 9, 12, 13) and write the result. Σm(A, B, C, D; 0, 1, 4, 5, 8, 9, 12, 13)
#ABCDf
0FALSEFALSEFALSEFALSETRUE
1FALSEFALSEFALSETRUETRUE
2FALSEFALSETRUEFALSEFALSE
3FALSEFALSETRUETRUEFALSE
4FALSETRUEFALSEFALSETRUE
5FALSETRUEFALSETRUETRUE
6FALSETRUETRUEFALSEFALSE
7FALSETRUETRUETRUEFALSE
8TRUEFALSEFALSEFALSETRUE
9TRUEFALSEFALSETRUETRUE
10TRUEFALSETRUEFALSEFALSE
11TRUEFALSETRUETRUEFALSE
12TRUETRUEFALSEFALSETRUE
13TRUETRUEFALSETRUETRUE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

Σm(A, B, C, D; 0, 1, 4, 5, 8, 9, 12, 13)

Classification: contingent

AB \ CD
00
01
11
10
00
1m0
1m1
0m3
0m2
01
1m4
1m5
0m7
0m6
11
1m12
1m13
0m15
0m14
10
1m8
1m9
0m11
0m10
  1. cells m0, m1, m4, m5, m8, m9, m12, m13NOT C
NOT C · Derived NOT C. Exactly equivalent on every assignment.

The left half of the map, columns CD = 00 and 01, is a block of eight: A, B and D change, only C is fixed at FALSE. Result NOT C.

7. Group the Karnaugh map of Σm(A, B, C, D; 0, 2, 5, 7, 8, 10, 13, 15) and write the result. Σm(A, B, C, D; 0, 2, 5, 7, 8, 10, 13, 15)
#ABCDf
0FALSEFALSEFALSEFALSETRUE
1FALSEFALSEFALSETRUEFALSE
2FALSEFALSETRUEFALSETRUE
3FALSEFALSETRUETRUEFALSE
4FALSETRUEFALSEFALSEFALSE
5FALSETRUEFALSETRUETRUE
6FALSETRUETRUEFALSEFALSE
7FALSETRUETRUETRUETRUE
8TRUEFALSEFALSEFALSETRUE
9TRUEFALSEFALSETRUEFALSE
10TRUEFALSETRUEFALSETRUE
11TRUEFALSETRUETRUEFALSE
12TRUETRUEFALSEFALSEFALSE
13TRUETRUEFALSETRUETRUE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

Σm(A, B, C, D; 0, 2, 5, 7, 8, 10, 13, 15)

Classification: contingent

AB \ CD
00
01
11
10
00
1m0
0m1
0m3
1m2
01
0m4
1m5
1m7
0m6
11
0m12
1m13
1m15
0m14
10
1m8
0m9
0m11
1m10
  1. cells m0, m2, m8, m10NOT B AND NOT D
  2. cells m5, m7, m13, m15B AND D
(NOT B AND NOT D) OR (B AND D) · Derived (NOT B AND NOT D) OR (B AND D). Exactly equivalent on every assignment.

Two groups of four: the corners m0, m2, m8, m10 give NOT B AND NOT D, and the centre m5, m7, m13, m15 gives B AND D. Result (NOT B AND NOT D) OR (B AND D), which is B <-> D; A and C are irrelevant.

8. Group the Karnaugh map of Σm(A, B, C, D; 1, 3, 9, 11) and write the result. Σm(A, B, C, D; 1, 3, 9, 11)
#ABCDf
0FALSEFALSEFALSEFALSEFALSE
1FALSEFALSEFALSETRUETRUE
2FALSEFALSETRUEFALSEFALSE
3FALSEFALSETRUETRUETRUE
4FALSETRUEFALSEFALSEFALSE
5FALSETRUEFALSETRUEFALSE
6FALSETRUETRUEFALSEFALSE
7FALSETRUETRUETRUEFALSE
8TRUEFALSEFALSEFALSEFALSE
9TRUEFALSEFALSETRUETRUE
10TRUEFALSETRUEFALSEFALSE
11TRUEFALSETRUETRUETRUE
12TRUETRUEFALSEFALSEFALSE
13TRUETRUEFALSETRUEFALSE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

Σm(A, B, C, D; 1, 3, 9, 11)

Classification: contingent

AB \ CD
00
01
11
10
00
0m0
1m1
1m3
0m2
01
0m4
0m5
0m7
0m6
11
0m12
0m13
0m15
0m14
10
0m8
1m9
1m11
0m10
  1. cells m1, m3, m9, m11NOT B AND D
NOT B AND D · Derived NOT B AND D. Exactly equivalent on every assignment.

Rows AB = 00 and 10 are neighbours by wraparound, and columns CD = 01 and 11 are adjacent: a block of four with A and C changing, B = FALSE, D = TRUE throughout. Result NOT B AND D.

9. Group the Karnaugh map of Σm(A, B, C, D; 6) and write the result. Σm(A, B, C, D; 6)
#ABCDf
0FALSEFALSEFALSEFALSEFALSE
1FALSEFALSEFALSETRUEFALSE
2FALSEFALSETRUEFALSEFALSE
3FALSEFALSETRUETRUEFALSE
4FALSETRUEFALSEFALSEFALSE
5FALSETRUEFALSETRUEFALSE
6FALSETRUETRUEFALSETRUE
7FALSETRUETRUETRUEFALSE
8TRUEFALSEFALSEFALSEFALSE
9TRUEFALSEFALSETRUEFALSE
10TRUEFALSETRUEFALSEFALSE
11TRUEFALSETRUETRUEFALSE
12TRUETRUEFALSEFALSEFALSE
13TRUETRUEFALSETRUEFALSE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

Σm(A, B, C, D; 6)

Classification: contingent

AB \ CD
00
01
11
10
00
0m0
0m1
0m3
0m2
01
0m4
0m5
0m7
1m6
11
0m12
0m13
0m15
0m14
10
0m8
0m9
0m11
0m10
  1. cells m6NOT A AND B AND C AND NOT D
NOT A AND B AND C AND NOT D · Derived NOT A AND B AND C AND NOT D. Exactly equivalent on every assignment.

A single cell, m6, with no 1 beside it: nothing drops and the result is the full minterm NOT A AND B AND C AND NOT D.

10. Group the Karnaugh map of Σm(A, B, C, D; 0, 1, 2, 3, 8, 9, 10, 11) and write the result. Σm(A, B, C, D; 0, 1, 2, 3, 8, 9, 10, 11)
#ABCDf
0FALSEFALSEFALSEFALSETRUE
1FALSEFALSEFALSETRUETRUE
2FALSEFALSETRUEFALSETRUE
3FALSEFALSETRUETRUETRUE
4FALSETRUEFALSEFALSEFALSE
5FALSETRUEFALSETRUEFALSE
6FALSETRUETRUEFALSEFALSE
7FALSETRUETRUETRUEFALSE
8TRUEFALSEFALSEFALSETRUE
9TRUEFALSEFALSETRUETRUE
10TRUEFALSETRUEFALSETRUE
11TRUEFALSETRUETRUETRUE
12TRUETRUEFALSEFALSEFALSE
13TRUETRUEFALSETRUEFALSE
14TRUETRUETRUEFALSEFALSE
15TRUETRUETRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

Σm(A, B, C, D; 0, 1, 2, 3, 8, 9, 10, 11)

Classification: contingent

AB \ CD
00
01
11
10
00
1m0
1m1
1m3
1m2
01
0m4
0m5
0m7
0m6
11
0m12
0m13
0m15
0m14
10
1m8
1m9
1m11
1m10
  1. cells m0, m1, m2, m3, m8, m9, m10, m11NOT B
NOT B · Derived NOT B. Exactly equivalent on every assignment.

The first and last rows, AB = 00 and AB = 10, are neighbours by wraparound and together form a block of eight: A, C and D change and only B is fixed. Result NOT B.

Questions

How do I spot wraparound groups quickly?

Look at the values rather than the drawing: a set of 2, 4 or 8 cells is a group exactly when some variables are fixed across all of them and the others take every combination. The four corners all have B = FALSE, D = FALSE while A and C take all four combinations, which is why they group; the first and last rows share B = FALSE, which is why together they form a block of eight.

Related

Laws

Glossary

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.