Prof. Dr. Thorsten Jungmann (last updated 2026-10-19)
Relates to DET-03 Representation and minimization of logic functions
Task
With a Karnaugh map, you minimize a function graphically: loops of ones yield a minimized disjunctive normal form (DNF), loops of zeros a minimized conjunctive normal form (CNF). Draw the map of each function and give the result.
a) Minimize with a Karnaugh map, once with loops of ones and once with loops of zeros.
b) Minimize with loops of ones.
c) Minimize from b) with loops of zeros. Which of the two results needs fewer gates?
d) Minimize with loops of ones.
e) Minimize from d) with loops of zeros.
f) Draw the Karnaugh map of . Why does no loop help here? Give a circuit for with as few gates as possible.
Solution
Given
Given explicitly:
- a)
- b) and c)
- d) and e)
- f)
Known:
- Karnaugh map with two and with three inputs (DET-02)
- Arrangement of the Karnaugh map: neighbouring cells differ in exactly one input, also across the edges; the labels show where each input is 1 (DET-03)
- Rules for loops of ones and the product term of a loop (DET-03)
- Loops of zeros and their sum terms (DET-03)
- The chequerboard and XOR (DET-03)
- Effort of a circuit: the gates and their inputs (DET-03)
Required
a) the minimized DNF and the minimized CNF of
b) and d) the minimized DNF of and of
c) and e) the minimized CNF of and of ; in c), the result that needs fewer gates
f) the Karnaugh map of , the reason why no loop helps, and a circuit with as few gates as possible
a) Two inputs
With two inputs, the map has two rows for and two columns for (DET-02, 2.6). It contains a 1 in the cells of the minterms 0, 1 and 3 and a 0 in the cell of 2.
Loops of ones (figure): the ones in the cells of 0 and 1 are neighbours in the upper row. There, is 0, while changes, so this loop yields . The ones in the cells of 1 and 3 are neighbours in the right column: is 1, while changes, so this loop yields . The cell of 1 lies in both loops; loops may overlap (DET-03, 4.2).
Loops of zeros (figure): the single zero, in the cell of 2, has no neighbouring zero and forms a loop of one cell. There, is 1 and is 0. In a sum term, a variable that is 1 appears negated and a variable that is 0 appears as it is (DET-03, 4.3).
Both ways yield the same expression: the sum term of a single zero is its maxterm, and nothing is left to unite.
Check with the minterm list: is 1 in rows 0 and 1, in rows 1 and 3; together, these are rows 0, 1 and 3 ✓
b) Three inputs, loops of ones
With three inputs, the map has two rows for and four columns for and ; in the upper row, the cells contain the minterms 0, 1, 3 and 2, in the lower row 4, 5, 7 and 6 (DET-02, 2.6). The ones of form two loops (figure):
- The four ones in the first and the last column, in the cells of 0, 4, 2 and 6, form a loop of four, because the first and the last column are neighbours across the edge (DET-03, 4.1). In all four cells, is 0, while and change: the loop yields .
- The one in the cell of 5 is a neighbour of the one in the cell of 4 to its left. There, is 1 and is 0, while changes: the loop yields . The cell of 4 lies in both loops.
Check with the minterm list: is 1 in rows 0, 2, 4 and 6, in rows 4 and 5; together, these are rows 0, 2, 4, 5 and 6 ✓
c) Three inputs, loops of zeros
The zeros of lie in the cells of 1, 3 and 7 (figure). The cells of 1 and 3 are neighbours in the upper row: is 0 and is 1, while changes, so the sum term is . The cells of 3 and 7 are neighbours in the third column: is 1 and is 1, while changes, so the sum term is (DET-03, 4.3). The cell of 3 lies in both loops.
Counted as in the lesson (DET-03, 3.1):
| Minimized form | AND gates | OR gates | Gate inputs | Inverters |
|---|---|---|---|---|
| DNF of b) | 1 | 1 | 4 | 2 |
| CNF of c) | 1 | 2 | 6 | 2 |
The DNF of b) needs fewer gates: two gates with four gate inputs instead of three gates with six. Both forms need inverters for and .
Check: the CNF is 0 where one of its sum terms is 0. is 0 in rows 1 and 3, in rows 3 and 7; together, these are rows 1, 3 and 7, the zeros of ✓
d) Four inputs, loops of ones
With four inputs, the map has four rows and four columns: on the left of the rows and on the right of them, above and below the columns. Row by row, the cells contain the minterms 0, 2, 6 and 4; 1, 3, 7 and 5; 9, 11, 15 and 13; 8, 10, 14 and 12 (DET-03, 4.1). The ones of form two loops (figure):
- The four corners hold the minterms 0, 4, 8 and 12. Each corner is a neighbour of the corner in its row and of the corner in its column, so the four corners form a loop of four. In all four cells, and are 0, while and change: the loop yields .
- The minterms 5, 7, 13 and 15 form a square in the third and the fourth column of the two middle rows. There, and are 1, while and change: the loop yields .
The fourth column, with the minterms 4, 5, 13 and 12, would also form a loop of four ones. All its ones already lie in the two other loops, so it is not needed and is left out (DET-03, 4.2).
Check with the minterm list: is 1 in rows 0, 4, 8 and 12, in rows 5, 7, 13 and 15; together, these are the eight ones of ✓
e) Four inputs, loops of zeros
The zeros of form two loops of four (figure):
- The zeros in the cells of 1, 3, 9 and 11 form a square in the first and the second column of the two middle rows. There, is 0 and is 1, so the sum term is .
- The zeros in the cells of 2, 6, 10 and 14 lie in the second and the third column of the top and the bottom row. The top and the bottom row are neighbours across the edge, so the four cells form a loop. There, is 1 and is 0, so the sum term is (DET-03, 4.3).
Check: is 0 in rows 1, 3, 9 and 11, in rows 2, 6, 10 and 14; together, these are the eight zeros of ✓
f) The chequerboard
In the map of , the ones and zeros alternate like the squares of a chequerboard (figure). is 1 exactly in the rows with an odd number of ones among , , and : rows 1, 2, 4 and 8 contain a single 1, rows 7, 11, 13 and 14 contain three. Neighbouring cells differ in exactly one input, and a change of a single input always turns an odd number of ones into an even one, or vice versa. Every neighbour of a one is therefore a zero, and no loop can unite two cells: the minimized DNF would be the canonical one, with eight minterms of four literals each (DET-03, 4.5).
The chequerboard reveals XOR (DET-03, 4.5). An XOR gate delivers a 1 if its two inputs differ, that is, if an odd number of them is 1. One XOR gate combines and , a second one and ; each delivers a 1 if an odd number of its two inputs is 1. A third XOR gate delivers a 1 if exactly one of the two pairs contains an odd number of ones, and this is the case exactly if an odd number of all four inputs is 1:
Three XOR gates with two inputs replace eight AND gates with four inputs, an OR gate with eight inputs and four inverters.
Check in row 7, with , , and :
Row 7 is in the minterm list ✓
