Almaaqal University
Digital Logic
Control and Computer Engineering
First – Stage
Prepared by: Salma Ali Alhashimi
1
CHAPTER THREE
KARNAUGH MAP MINIMIZATION
3.1 Introduction
A Karnaugh map provides a systematic method for simplifying Boolean
expressions and, if properly used, will produce the simplest SOP or POS
expression possible, known as the minimum expression. As you have seen, the
effectiveness of algebraic simplification depends on your familiarity with all the
laws, rules, and theorems of Boolean algebra and on your ability to apply them.
The Karnaugh map, on the other hand, provides a "cookbook" method for
simplification.
A Karnaugh map is similar to a truth table because it presents all of the possible
values of input variables and the resulting output for each value. Instead of being
organized into columns and rows like a truth table, the Karnaugh map is an array
of cells in which each cell represents a binary value of the input variables. The
cells are arranged in a way so that simplification of a given expression is simply
a matter of properly grouping the cells. Karnaugh maps can be used for
expressions with two, three, four. and five variables.
The number of cells in a Karnaugh map is equal to the total number of possible
input variable combinations as is the number of rows in a truth table. For three
variables, the number of cells is 2 3 = 8. For four variables, the number of cells is
24 = 16.
The 3-Variable Karnaugh Map
The 3-variable Karnaugh map is an array of eight cells. as shown in Fig. (3-1) (a).
In this case, A, B, and C are used for the variables although other letters could be
used. Binary values of A and B are along the left side (notice the sequence) and
the values of C are across the top. The value of a given cell is the binary values
of A and B at the left in the same row combined with the value of C at the top in
the -same column. For example, the cell in the upper left corner has a binary value
of 000 and the cell in the lower right corner has a binary value of 101. Fig. (3-1)
(b) shows the standard product terms that are represented by each cell in the
Karnaugh map.
1
2
Figure 3.1 A 3-variable Karnaugh map showing product terms
The 4-Variable Karnaugh Map
The 4-variable Karnaugh map is an array of sixteen cells, as shown in Fig.(3-
2)(a). Binary values of A and B are along the left side and the values of C and D
are across the top. The value of a given cell is the binary values of A and B at the
left in the same row combined with the binary values of C and D at the top in the
same column. For example, the cell in the upper right corner has a binary value
of 0010 and the cell in the lower right corner has a binary value of 1010. Fig.(3-
2)(b) shows the standard product terms that are represented by each cell in the 4-
variable Karnaugh map.
2
3
Fig. (3-2) A 4-variable Karnaugh map
Cell Adjacency
The cells in a Karnaugh map are arranged so that there is only a single-variable
change between adjacent cells. Adjacency is defined by a single-variable change.
In the 3-variable map the 010 cell is adjacent to the 000 cell, the 011 cell, and the
110 cell. The 010 cell is not adjacent to the 001 cell, the 111 cell, the 100 cell, or
the 101 cell.
Adjacent cells on a Karnaugh map are those that differ by only one variable. Arrows point
between adjacent cells.
3
4
3.2 KARNAUGH MAP SOP MINIMIZATION
For an SOP expression in standard form, a 1 is placed on the Karnaugh map for
each product term in the expression. Each 1 is placed in a cell corresponding to
the value of a product term. For example, for the product term ABC, a 1 goes in
the 10l cell on a 3-variable map.
4
5
3.3 Mapping Nonstandard SOP Expression
Map the following SOP expression on a Karnaugh map
Solution
The SOP expression is obviously not in standard form because each product term
does not have three variables. The first term is missing two variables, the second
term is missing one variable, and the third term is standard. First expand the terms
numerically as follows:
5
6
Example Map the following SOP expression on a Karnaugh map:
Solution
The SOP expression is obviously not in standard form because each product term
does not have four variables.
Map each of the resulting binary values by placing a 1 in the appropriate cell of
the 4- variable Karnaugh map.
6
7
3.4 Karnaugh Map Simplification of SOP Expressions
Grouping the 1s, you can group 1s on the Karnaugh map according to the
following rules by enclosing those adjacent cells containing 1s. The goal is to
maximize the size of the groups and to minimize the number of groups.
• A group must contain either 1, 2, 4, 8, or 16 cells, which are all powers of
two. In the case of a 3-variable map, 23 = 8 cells is the maximum group.
• Each cell in a group must be adjacent to one or more cells in that same
group.
• Always include the largest possible number of 1s in a group in accordance
with rule 1.
• Each 1 on the map must be included in at least one group. The 1s already
in a group can be included in another group as long as the overlapping
groups include noncommon 1s.
Example: Group the 1s in each of the Karnaugh maps in the figure below
7
8
Solution:
The groupings are shown below, in some cases, there may be more than one way
to group the 1s to form maximum groupings.
Example: Determine the product terms for each of the Karnaugh maps in the
figure above and write the resulting minimum SOP expression.
Solution:
The resulting minimum product term for each group is shown in the above figure.
The minimum SOP expressions for each of the Karnaugh maps in the figure are:
8
9
Homework: Use Karnaugh map to minimize the following SOP expression
9
3.5 Mapping directly from a truth table
After using K-map the simplified logic expression will be X = AC + AB +BC
3.6 "Don't Care" Conditions
Sometimes a situation arises in which some input variable combinations are not
allowed. For example, recall that in the BCD code there are six invalid
combinations: 1010, 1011, 1100, 1101, 1110, and 1111. Since these unallowed
states will never occur in an application involving the BCD code, they can be
treated as "don't care" terms with respect to their effect on the output. That is, for
these "don't care" terms either a 1 or a 0 may be assigned to the output: it really
does not matter since they will never occur. The "don't care" terms can be used
to advantage on the Karnaugh map. The figure below shows that for each "don't
care" term, an X is placed in the cell. When grouping the 1 s, the Xs can be treated
as 1s to make a larger grouping or as 0s if they cannot be used to advantage. The
larger a group, the simpler the resulting term will be.
10
3.7 KARNAUGH MAP POS MINIMIZATION
In this section, we will focus on POS expressions. The approaches are much the
same except that with POS expressions, 0s representing the standard sum terms
are placed on the Karnaugh map instead of 1s.
For a POS expression in standard form, a 0 is placed on the Karnaugh map for
each sum term in the expression. Each 0 is placed in a cell corresponding to the
value of a sum term. For example, for the sum term A + B + C, a 0 goes in the 0
1 0 cell on a 3-variable map.
When a POS expression is completely mapped, there will be a number of 0s on
the Karnaugh map equal to the number of sum terms in the standard POS
expression. The cells that do not have a 0 are the cells for which the expression
is 1. Usually, when working with POS expressions, the 1s are left off. The
following steps and the illustration in the figure below shows the mapping
process.
Step 1. Determine the binary value of each sum term in the standard POS
expression. This is the binary value that makes the term equal to 0.
11
Step 2. As each sum term is evaluated, place a 0 on the Karnaugh map in the
corresponding cell.
Example:
12
Example:
13
3.8 Converting between POS and SOP using Karnaugh
Map
Example: Using a Karnaugh map, convert the following standard POS
expression into a minimum POS expression, a standard SOP expression, and a
minimum SOP expression.
14
SHEET
1- Consider the truth table that shown below. Use Karnaugh map to find the minimum
POS expression then draw a circuit diagram of the simplified expression.
A B C F
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
2- Consider the truth table that shown below. Use Karnaugh map to find the minimum
POS expression then draw a circuit diagram of the simplified expression.
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
3- Use Karnaugh map to minimize the following SOP expression. F = AC + AB`
4- Use Karnaugh map to minimize the following SOP expression F = AB` + AC`D +
ABC`
5- Use Karnaugh map to minimize the following SOP expression F = C + AD` +
A`BC`D + AB`C
6- Use Karnaugh map to minimize the following SOP expression
F(A, B, C) = ∑m (0,2,6,7) + ∑d(1,3)
7- Use Karnaugh map to minimize the following
F(a, b, c, d) = ∑m (0,3,6,9,11,13,14) +∑d (5,7,10,12)
8- Draw a block diagram (design a logic gate from the following Boolean
expression). Use two inputs gates only
Y = AC +B`C +ABC`
9-
10- Use Boolean algebra to simplify the following expression
Z = A [B + C (AB +AC)]
11- Use Karnaugh map to minimize the following Y = Π M (1, 2, 3, 4,9,12)
12- Use Karnaugh map to minimize the following Y(A, B, C, D) = Π M
(0,2,4,5,10,12,13)
13- Use Karnaugh map to minimize the following f (A, B, C, D) = Π M (1, 3, 8, 9,
10, 11, 14) . D(7, 15)