Click each cell to switch it between 0, 1 and X (don't care), or type the minterms. The tool groups the ones
and gives the simplified function.
Minimal sum of products (SOP)–
Minimal product of sums (POS)–
Groups chosen
How to solve a Karnaugh map
1. What it is and what it is for
A Karnaugh map is a graphical form of the truth table in which neighbouring cells differ in only one variable
(rows and columns follow the Gray code: 00, 01, 11, 10). Grouping neighbouring cells is therefore equivalent to applying the property
\(X\,Y + X\,\overline{Y} = X\) and eliminating variables, without doing the algebra by hand.
2. Grouping rules
Groups can only have 1, 2, 4, 8, 16 or 32 cells, and must be rectangular.
The bigger, the better: each time the size doubles, one variable disappears.
The edges touch: the first and last row (or column) are neighbours, and the four corners form a group.
A cell can be in several groups. Use the X cells only if they help to enlarge a group.
Use the smallest number of groups that covers all the ones.
With 5 and 6 variables, columns (or rows) placed symmetrically about the centre of the map are also neighbours: that is why some groups appear split into two blocks.
3. Reading each group
In each group, the variables that change value are eliminated. Those that do not change stay in the term: uncomplemented if they are 1 and complemented if they are 0.
For the product-of-sums form, the zeros are grouped and read the other way round (complemented if they are 1).
The whole column CD = 11 (3, 7, 11, 15) gives \(C\,D\). To cover the 1, use the don't cares 0 and 2 or 5: with 1, 3, 5 and 7 you get
\(\overline{A}\,D\). Result: \(f = C\,D + \overline{A}\,D\).