Karnaugh Mapping
Digital Circuits
A Karnaugh map is nothing more than a special form of truth table, useful for reducing logic functions into minimal Boolean expressions.
Here is a truth table for a specific threeinput logic circuit:

Complete the following Karnaugh map, according to the values found in the above truth table:

A Karnaugh map is nothing more than a special form of truth table, useful for reducing logic functions into minimal Boolean expressions.
Here is a truth table for a specific fourinput logic circuit:

Complete the following Karnaugh map, according to the values found in the above truth table:

Here is a truth table for a fourinput logic circuit:

If we translate this truth table into a Karnaugh map, we obtain the following result:

Note how the only 1’s in the map are clustered together in a group of four:

If you look at the input variables (A, B, C, and D), you should notice that only two of them actually change within this cluster of four 1’s. The other two variables hold the same value for each of these conditions where the output is a “1”. Identify which variables change, and which stay the same, for this cluster.
Here is a truth table for a fourinput logic circuit:

If we translate this truth table into a Karnaugh map, we obtain the following result:

Note how the only 1’s in the map all exist on the same row:

If you look at the input variables (A, B, C, and D), you should notice that only two of them are constant for each of the “1” conditions on the Karnaugh map. Identify these variables, and remember them.
Now, write an SOP (SumofProducts) expression for the truth table, and use Boolean algebra to reduce that raw expression to its simplest form. What do you notice about the simplified SOP expression, in relation to the common variables noted on the Karnaugh map?
One of the essential characteristics of Karnaugh maps is that the input variable sequences are always arranged in Gray code sequence. That is, you never see a Karnaugh map with the input combinations arranged in binary order:

The reason for this is apparent when we consider the use of Karnaugh maps to detect common variables in output sets. For instance, here we have a Karnaugh map with a cluster of four 1’s at the center:

Arranged in this order, it is apparent that two of the input variables have the same values for each of the four “high” output conditions. Redraw this Karnaugh map with the input variables sequenced in binary order, and comment on what happens. Can you still tell which input variables remain the same for all four output conditions?

Examine this truth table and corresponding Karnaugh map:

Though it may not be obvious from first appearances, the four “high” conditions in the Karnaugh map actually belong to the same group. To make this more apparent, I will draw a new (oversized) Karnaugh map template, with the Gray code sequences repeated twice along each axis:

Fill in this map with the 0 and 1 values from the truth table, and then see if a grouping of four “high” conditions becomes apparent.
A student is asked to use Karnaugh mapping to generate a minimal SOP expression for the following truth table:
A B C Output
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
Following the truth table shown, the student plots this Karnaugh map:

“This is easy,” says the student to himself. “All the ‘1’ conditions fall within the same group!” The student then highlights a triplet of 1’s as a single group:

Looking at this cluster of 1’s, the student identifies C as remaining constant (1) for all three conditions in the group. Therefore, the student concludes, the minimal expression for this truth table must simply be C.
However, a second student decides to use Boolean algebra on this problem instead of Karnaugh mapping. Beginning with the original truth table and generating a SumofProducts (SOP) expression for it, the simplification goes as follows:






Obviously, the answer given by the second student’s Boolean reduction (AC + BC) does not match the answer given by the first student’s Karnaugh map analysis (C).
Perplexed by the disagreement between these two methods, and failing to see a mistake in the Boolean algebra used by the second student, the first student decides to check his Karnaugh mapping again. Upon reflection, it becomes apparent that if the answer really were C, the Karnaugh map would look different. Instead of having three cells with 1’s in them, there would be four cells with 1’s in them (the output of the function being “1” any time C = 1:

Somewhere, there must have been a mistake made in the first student’s grouping of 1’s in the Karnaugh map, because the map shown above is the only one proper for an answer of C, and it is not the same as the real map for the given truth table. Explain where the mistake was made, and what the proper grouping of 1’s should be.
A seven segment decoder is a digital circuit designed to drive a very common type of digital display device: a set of LED (or LCD) segments that render numerals 0 through 9 at the command of a fourbit code:

The behavior of the display driver IC may be represented by a truth table with seven outputs: one for each segment of the sevensegment display (a through g). In the following table, a “1” output represents an active display segment, while a “0” output represents an inactive segment:
D C B A a b c d e f g Display
0 0 0 0 1 1 1 1 1 1 0 “0”
0 0 0 1 0 1 1 0 0 0 0 “1”
0 0 1 0 1 1 0 1 1 0 1 “2”
0 0 1 1 1 1 1 1 0 0 1 “3”
0 1 0 0 0 1 1 0 0 1 1 “4”
0 1 0 1 1 0 1 1 0 1 1 “5”
0 1 1 0 1 0 1 1 1 1 1 “6”
0 1 1 1 1 1 1 0 0 0 0 “7”
1 0 0 0 1 1 1 1 1 1 1 “8”
1 0 0 1 1 1 1 1 0 1 1 “9”
A reallife example such as this provides an excellent showcase for techniques such as Karnaugh mapping. Let’s take output a for example, showing it without all the other outputs included in the truth table:
D C B A a
0 0 0 0 1
0 0 0 1 0
0 0 1 0 1
0 0 1 1 1
0 1 0 0 0
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
Plotting a Karnaugh map for output a, we get this result:

Identify adjacent groups of 1’s in this Karnaugh map, and generate a minimal SOP expression from those groupings.
Note that six of the cells are blank because the truth table does not list all the possible input combinations with four variables (A, B, C, and D). With these large gaps in the Karnaugh map, it is difficult to form large groupings of 1’s, and thus the resulting “minimal” SOP expression has several terms.
However, if we do not care about output a’s state in the six nonspecified truth table rows, we can fill in the remaining cells of the Karnaugh map with “don’t care” symbols (usually the letter X) and use those cells as “wildcards” in determining groupings:

With this new Karnaugh map, identify adjacent groups of 1’s, and generate a minimal SOP expression from those groupings.
When designing a circuit to emulate a truth table such as this where nearly all the input conditions result in “1” output states, it is easier to use ProductofSums (POS) expressions rather than SumofProducts (SOP) expressions:
A B C Output
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
Is it possible to use a Karnaugh map to generate the appropriate POS expression for this truth table, or are Karnaugh maps limited to SOP expressions only? Explain your answer, and how you were able to obtain it.
Use a Karnaugh map to generate a simple Boolean expression for this truth table, and draw a gate circuit equivalent to that expression:
A B C D Output
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 1
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 1
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 1
1 1 1 1 1
Use a Karnaugh map to generate a simple Boolean expression for this truth table, and draw a gate circuit equivalent to that expression:
A B C D Output
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 1
1 0 0 1 0
1 0 1 0 1
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 1
1 1 1 1 1
Use a Karnaugh map to generate a simple Boolean expression for this truth table, and draw a relay circuit equivalent to that expression:
A B C D Output
0 0 0 0 1
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 1
0 1 0 1 0
0 1 1 0 1
0 1 1 1 0
1 0 0 0 1
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 1
1 1 0 1 0
1 1 1 0 1
1 1 1 1 0
Use a Karnaugh map to generate a simple Boolean expression for this truth table, and draw a relay circuit equivalent to that expression:
A B C D Output
0 0 0 0 1
0 0 0 1 0
0 0 1 0 1
0 0 1 1 0
0 1 0 0 1
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 0
1 0 1 0 1
1 0 1 1 0
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
Published under the terms and conditions of the Creative Commons Attribution License