You are on page 1of 30

Chapter 7 Karnaugh Maps and VEMs

Finding the simplest form of a logic expression is not trivial. Sometimes an expression must first be
made more complex before the simplest form can emerge. Finding the simplest SOP or POS form
(perhaps to minimize propagation delay) is a more tractable problem. The basic approach is to
write the logic expression as the sum of minterms (or a product of maxterms) and to simplify with
logic adjacency (Theorem 4.23). The Karnaugh Map is a tool that not only helps us perform this
simplification in a systematic way, it is sometimes able to exploit invalid input combinations to
simplify logic expressions even more.

7.1 Karnaugh Maps


One of the challenges that we encounter simplifying sums of minterms (or products of maxterms) is
that it is often difficult to see which terms are logically adjacent (i.e. which terms can be simplified
using the logic adjacency theorem). In the early 1950s, Maurice Karnaugh realized that this
problem can be solved by writing the minterms or maxterms so that logically adjacent terms are
also physically adjacent. For example, the minterms of the expression
+ +
can be
inserted in a table or map that places adjacent minterms next to each other (See Figure 7-1)

Figure 7-1. Logical and Physical Adjacency.


From Figure 7-1 it is evident that
is logically adjacent to both and
approach to simplifying the expression.
+ +

= +(

)+

=( +

)+(

. This suggests an

)=

(7.1)

What if there are three variables? It is easy if we use three dimensions, then each minterm can be
placed in a box as shown in Figure 7-2.

Figure 7-2 Logical and Physical adjacency in 3-D.


Unfortunately, this approach is hard to do on paper and does not generalize to four or more
variables. Instead, we flatten Figure 7-2 by folding the back half of the cube to the front, giving us
the map in Figure 7-3.

Figure 7-3. A Three Variable Map.


Note that the column and the
column in Figure 7-3 are not physically adjacent, but were
adjacent in Figure 7-2. We must always remember that the first and last columns of a map are
logically adjacent.
Example 7.1. Use the map from Figure 7-3 to simplify the expression:
+

=
+
+
Solution: First, Insert these minterms into the map:

We see immediately that


first,
is adjacent to

is adjacent to
, and because the last column is adjacent to the
. Combining these terms with logic adjacency, we get:
= +

Figure 7-4 shows a Karnaugh Map for Example 7.1. Since each minterm has an assigned cell in the
map and can appear nowhere else, writing it inside the cell is redundant. Instead, cells that
correspond to minterms in the logic expression are assigned the value of 1. All other cells are
assigned the value of 0.

AB
C

00

01
0

11
2

0
1

10
6

1
3

1
7

Figure 7-4. Karnaugh Map for Example 7.1.


Notice that the Karnaugh map has two other differences. The first is a shorthand way of naming the
rows and columns. The other is the small number in the upper right corner of each cell. This
number is optional, but if it is present, it indicates which minterm (Figure 4-5) is associated with
the cell.
The strength of the Karnaugh map is that it provides a relatively easy way to simplify logic
expressions. Every rectangular group of 2, 4 or 8 cells corresponds to a logic term that is simpler
than a minterm. The objective is to group all the ones in the map such that (a) the number of groups
is minimized and (b) the size of each group is maximized.
At this point, it should be mentioned that Karnaugh maps may also be used to simplify product-ofsum (POS) expressions by grouping the zeros instead of the ones. This technique will be discussed
shortly, but for the moment we will limit our discussion of Karnaugh maps to sum-of-product (SOP)
simplification.
Finding a simplified logic expression using a Karnaugh map takes three steps. The map must first be
filled with ones and zeros. Second, the ones must be grouped in an optimal way. Finally, the
simplified expression must read from the map. It is instructive to start with the final step, reading
the map.
Reading the Karnaugh Map
The simplified logic expression we derive from a Karnaugh map is the sum of one or more products,
or terms. Each term corresponds to one group on the map, so the first step to reading a Karnaugh
map is to derive a term for each group. This can be done by applying the logic adjacency theorem to
all the minterms in the group, but there is a shortcut. Simply write down the variable(s) that are
common to all the minterms in the group. To illustrate this procedure, consider Figure 7-5, which
shows the optimal grouping for the Karnaugh map in Figure 7-4.
AB
C

00

01
0

11
2

0
1

1
7

10
6

Figure 7-5. Optimal Grouping of Figure 7-4.

In the top group of Figure 7-5, each minterm contains A and (the right two columns have A=1, and
the top row has C=0), so the term associated with that group is A . In the second group, each
minterm contains and C, so the term associated with that group is C. The sum of these terms
gives +
, which matches the result in Example 7.1.
Example 7.2. Use a Karnaugh Map to simplify the logic expression for the prime number detector in
Section 4.2.
Solution: From Equations 4.6 and 4.7, we have:
PRIME=

= m2 + m3 + m5 + m7.

Since the expression consists of minterms 2, 3, 5 and 7, we simply fill those cells in the Karnaugh
map with ones. All the other cells are filled with zeros:
B2B1
00

B0

01
0

11
2

1
1

10
6

0
3

0
7

The leftmost (vertical) grouping gives the term


and the rightmost grouping gives the term
. The simplified logic expression is the sum of these terms, or
PRIME=

Which agrees with Equation 4.25, the simplification obtained using theorems in Boolean Algebra.

Example 7.3. Find the simplified logic expression for the Karnaugh map shown below:
AB
C

00

01
0

11
2

1
1

10
6

1
3

0
7

Solution: In the group of four, the only variable that is common to all minterms is B. In the group of
two, the variables in common are and , so the simplified expression is
+

Suppose it is necessary to simplify an expression with four variables. The Karnaugh map may be
extended to support up to 4 variables by adding two more rows. Figure 7-6 illustrates such a map.
Note that the top and bottom rows are adjacent. (We will see how to handle more than four
variables in Section 7.3.).
AB
CD

00

01
0

00

01

11

1
1

13

0
15

11

1
14

0
2

10
12

1
3

10

11
4

10

Figure 7-6. Four Variable Karnaugh Map.


The student is encouraged to verify that the simplified logic expression is

Filling the Karnaugh Map


Filling a Karnaugh map is straightforward if the behavior of the circuit is defined by a truth table.
Recall that if the output on a row of a truth table is 1, the minterm associated with that row is
included in the logic expression, but if a minterm is included in the logic expression, its position in
the Karnaugh map must also be 1. The upshot is that if the truth table is in order, filling the
Karnaugh map is a matter of copying each output into the Karnaugh map in minterm order. (See
Figure 7-7.)

A
0
0
0
0
1
1
1
1

B
0
0
1
1
0
0
1
1

C
0
1
0
1
0
1
0
1

F
1
1
0
1
1
0
0
0

}
}
}
}

AB
C

00

01
0

11
2

0
1

0
3

10
6

1
7

Figure 7-7. Copying a Truth Table to a Karnaugh Map.

Note also from Figure 7-7 that the variable names on the Karnaugh map must match the inputs of
the truth table, with the leftmost input first.
Example 7.4. Make a Karnaugh Map for the truth table below.
X
0
0
0
0
1
1
1
1

Y
0
0
1
1
0
0
1
1

Z
0
1
0
1
0
1
0
1

F
1
0
1
1
0
0
1
0

Solution: Use a three variable Karnaugh map with variables labeled X, Y and Z in that order. Copy
the output column into the map in minterm order.
XY
Z

00

01
0

1
1

11
2

1
3

10
6

0
7

If the circuit behavior is defined by a logic expression instead of a truth table, the most straightforward way to fill a Karnaugh map is to first make a truth table by evaluating the expression for
every possible input combination and then to fill the Karnaugh map from the truth table.

Example 7.5. Make a Karnaugh Map for the expression +

Solution: First make a truth table. For each possible combination of U, V and W, evaluate the
expression +
and write it in the output column of the truth table.

U
0
0
0
0
1
1
1
1

V
0
0
1
1
0
0
1
1

W
0
1
0
1
0
1
0
1

+
1
1
0
0
1
1
1
0

}
}
}
}

UV
W

00

01
0

11
2

0
1

1
3

10
6

1
7

Then copy the output column into the Karnaugh map in minterm order.

With time and experience, it will be possible to skip the truth table and fill the Karnaugh map
directly from the logic expression.
If the logic expression is a sum of products, there is a shortcut to filling the Karnaugh map. The
technique is essentially to reverse the process of reading the map. Recall that each product of
variables corresponds to a grouping of 1s, so to fill a Karnaugh map from a sum of products
expression, all that is required is to fill in the group of 1s associated with each product (ignoring
cells that already contain a 1). When all groups have been filled in, fill the remaining cells with 0.
This process can best be illustrated by example. Suppose we want to fill in a Karnaugh map with
the expression + + +
, the first step is to draw a blank Karnaugh map, then fill in
groups one by one. Figure 7-8(a) shows the Karnaugh map after the products have been filled in.
Figure 7-8(b) shows the Karnaugh map after the remaining cells have been filled with zeros.

AB
CD

00

01
0

00

01

10

12

CD

13

1
3

AB

10

1
1

11

11

1
7

15

01

0
5

11

10

13

1
9

10

10
12

11

14

00

11
4

1
6

01
0

00

1
15

11

0
6

1
14

10

(a)

(b)

Figure 7-8. Generating a Karnaugh Map from

+ + +

Grouping
The goal of grouping on a Karnaugh map is to find an optimal set of groups that cover all the 1s on
the Karnuagh map but do not cover any of the 0s.
Each (rectangular) group of one, two, four or eight 1s corresponds to a product of four, three, two
or one variable, respectively. These products and their equivalent groupings are called implicants.
Since larger groups correspond to simpler expressions, it is never an advantage to use a smaller
grouping when a larger one is available. Consequently, we dismiss out of hand any grouping that
can be covered by a larger group. The larger groupings that remain afterward are called prime
implicants. Usually not all of the prime implicants are needed to cover all the 1s on the map. To
illustrate, all of the implicants for the Karnaugh map in Figure 7-9 are shown, but only the four
implicants indicated by red loops are prime. Note that minterms 9 and 13 make a group as do
minterms 11 and 15, but these groups are not prime because they are covered by a larger group.
Also note that the prime implicant that covers minterms12 and 13 can be removed and all the 1s in
the map will still be covered by other prime implicants.
AB
CD

00

01
0

00

01

11

10

11
4

1
1

1
5

0
3

13

1
15

11

1
14

0
2

10
12

10

Figure 7-9. Prime Implicants.

If a cell is covered by only one prime implicant, that implicant is called an essential prime implicant,
or simply an essential implicant. All essential implicants must be included in the final grouping.
Consider Figure 7-10. All the prime implicants are shown. The grouping that covers minterms
1,5,9 and 13 (denoted m(1,5,9,13)) is an essential implicant because no other prime implicant
covers cell 5. Likewise, (1, 3, 9,11) is also an essential implicant because no other prime implicant
covers cell 11.
AB
CD

00

01
0

00

01

11

10

11
4

0
1

1
5

13

0
2

1
15

0
6

1
3

10
12

11

1
14

10

Figure 7-10. Karnaugh Map with Two Essential Implicants..


After all the essential implicants are covered, we must find a minimum set of prime implicants that
cover the remaining 1s. The simplest way to do this is a two-step process. First, select a set of
prime implicants that covers the most uncovered 1s. In Figure 7-10 there are two sets to choose
from. The first set contains two groups, m(2,6) and m(14,15), while the second set contains
only (6,14). (Note that once m(6,14) is covered, all the other implicants have covered 1s and
can no longer be included.) Since the first set covers more 1s, we select that set. And move onto
the next step. Sometimes, however, there will be no clear choice. In that case, select (any one of)
the largest implicants and treat it like an essential implicant, then repeat the process.
After the set of implicants have been chosen to cover the uncovered 1s, the next step is to cover any
remaining uncovered 1s. These choices are almost always arbitrary, except that larger groups are
preferred over smaller ones. At this point, all remaining 1s are covered by multiple implicants and
each of those implicant covers something else. The Karnaugh map in Figure 7-10 has no uncovered
1s remaining, so this step can be skipped.

AB
CD

00

01
0

00

01

11

10

11
4

10
12

0
13

1
15

11

1
14

10

Figure 7-11. Final Grouping for the Karnaugh Map in Figure 7-10
The final grouping for the Karnaugh map in Figure 7-10 is shown in Figure 7-11. To recap, groups
m(1,5,9,13) and m(1,3,9,11) are prime implicants and correspond to and
, respectively.
Groups m(2,6) and m(14,15) are non-essential implicants chosen to cover the remaining 1s.
These correspond to
and
respectively. The simplified SOP expression for this Karnaugh

map, therefore, is
+
+
+
.
Now consider the Karnaugh map in Figure 7-12. Each 1 in the map is covered by two implicants, so
there are no essential implicants.
AB
C

00

01
0

11
2

1
1

1
3

10
6

1
7

Figure 7-12. Karnaugh Map with No Clear Choice of Implicants.


The next step is to choose a set of implicants that covers the maximum number of uncovered 1s.
But in this case there are two: the set m(1,3), m(2,6), m(4,5) and the set m(2,3), m(4,6),
m(1,5). Both sets cover the same number of 1s, so the choice is arbitrary. The two optimal
groupings and the simplified expressions for each are shown in Figure 7-13.

AB
C

00

01

11

1
7

00

01
0

AB

10

1
1

11
2

1
3

10
6

1
5

Figure 7-13. Two Optimal Groupings for the Map in Figure 7-12.
Now consider a Karnaugh map that cannot be covered by essential implicants and by implicants
that cover only uncovered 1s. The Karnaugh map in Figure 7-14 has two essential implicants,
m(1,4) and m(3,7). Once these implicants are covered, we look for a set of implicants that
include only uncovered cells and find none, since at this point only cell 2 remains uncovered.
AB
C

00

01
0

11
2

1
1

0
3

10
6

1
7

Figure 7-14. Karnaugh Map with Optional Implicants.


The final step is to cover the remaining uncovered cells using the largest groupings possible. In this
case, cell 2 can be covered by either m(0,2) or by m(2,3). Since neither group is larger than the
other, the choice is arbitrary. The groupings for both choices and the logic expressions for each are
shown in Figure 7-15.
AB
C

00

01
0

11
2

1
1

0
3

1
+

AB

10
4

1
7

1
+

00

01
0

11
2

1
1

10
6

0
3

1
7

Figure 7-15. Two Optimal Groupings for the Map in Figure 7-14.
In summary, the procedure for finding an optimal grouping for a Karnaugh map takes three steps:
First, select all essential implicants. Second, select the set of implicants that cover the most (and
only) uncovered 1s. If there is no clear choice, select the largest implicant and treat it as essential
and repeat. Third, for each of the 1s that remain, select the largest prime implicant that covers it.

Example 7.6. Find a simplest SOP form for the expression represented by the Karnaugh map below.
AB
CD

00

01
0

00

01

11

10

11
4

0
1

0
1
7

15

11

0
14

0
13

1
3

10
12

10

Solution: m(1,5,13,9) is essential because it is the only prime implicant that covers cell 9.
m(1,3,5,7) is essential because it is the only prime implicant that covers cell 3. And m(10,14) is
essential because it is the only prime implicant that covers cell 10. The essential implicants are
shown below, looped in black. This leaves only cell 15 uncovered. There are two prime implicants
that cover cell15: m(5,7,13,15), shown below looped with green, and m(14,15), shown below
looped in red. Since the larger group results in a simpler expression, we choose m(5,7,13,15).
AB
CD

00

01
0

00

01

11

0
1

13

1
15

1
6

1
2

10
12

1
3

10

11
4

11

0
14

10

Converting these implicants (except the one looped in red) to a logical expression, we have:

+ +

It is always important to keep the goals of grouping in mind. We endeavor to keep the number of
loops at a minimum because each group introduces a product term and also means an extra or-gate
input. We endeavor to loop the largest groups possible because each time we double the size of a
group, we reduce the number of and-gate inputs by one. With practice, finding an optimal grouping
on a Karnaugh map will become easier as long as these goals are kept in mind.

Example 7.7. Find a simplest SOP form for the expression represented by the Karnaugh map below.
AB

00

CD

01
0

00

01

11

10

11
4

1
1

1
13

1
7

1
15

0
2

1
3

10
12

11

1
6

0
14

10

Solution: There are no essential implicants, and there is no clear set of implicants that covers the
most uncovered 1s, so we select one of the largest implicants, m(2,6,10,14), and treat it as though
it is essential. Once this is done, there is only one set of implicants that covers the most uncovered
1s. That set is looped in green, below.
AB
CD

00

01
0

00

01

11

10

11
4

1
1

1
13

1
15

11

0
2

1
3

10
12

0
14

10

Converting these implicants to a logical expression, we have:


+

At the beginning of this section, it was mentioned that Karnaugh maps can also be used to find a
simplified product of sums expression, and that is still true. The process involves looping the 0s
instead of the 1s and reading maxterms out of the Karnaugh map instead of minterms. Reading
maxterms from the map is a little trickier but otherwise it is the same. Another technique that may
be easier to remember is to use the Karnaugh map exactly as we did before, but complement the
expression before and after simplification with the Karnaugh map. This amounts to complementing
all the 1s and 0s in the map before simplification and complementing the SOP expression (with De
Morganss theorem) afterwards. These two approaches may best be illustrated by example.

Example 7.8. Find a simplest POS form for the expression represented by the Karnaugh map below
by circling 0s.
AB
CD

00

01
0

00

01

11

10

11
4

0
1

13

0
15

11

1
14

1
2

0
3

10
12

10

Solution: The first step is to select the essential implicants. In this case there are two. The first is
M(4,5,12,13) because no other prime implicant covers cell 12, and the second is M(1,5,9,13)
because no other prime implicant covers cell 9. The second step is to find a set of groups that cover
as many uncovered 0s as possible. In this case, there are two candidate sets, but both only cover
two of the remaining 0s. The first set contains only M(2,3) and the other set contains only
M(2,6). Since neither set covers more than the other, and since both groups are the same size, the
choice is arbitrary. We will select M(2,6) as shown in the Karnaugh map below and to the left.
AB
CD

00

01
0

00

01

11

10

11
4

0
1

12

15

00

00

01

11

10

11
4

0
1

13

0
15

1
6

1
2

10
12

0
3

10

01
0

11

1
14

CD

1
6

13

AB

10

11

1
14

10

In the third step, we cover the remaining 0s with the largest possible group. In this case, the
implicants that cover cell 3, the only 0 left, are M(2,3) and M(1,3). Again both groups are the
same size, so the choice is arbitrary and we choose M(1,3) as shown in the Karnaugh map above
and to the right. All that remains is to read the map. Combining maxterms with logic adjacency, we
have: M(4,5,12,13)( +C), M(1,5,9,13) )(C+ ), M(2,6)(A+ +D) and M(1,3)(A+B+ ),
Forming a product of these sums, we have:
( + )( + )( + + )( +

+ ).

Example 7.9. Find a simplest POS form for the expression represented by the Karnaugh map in
example 7.8 by complementing, finding the optimal SOP expression, and then complementing that
expression.
Solution: Complement all the 1s and 0s in the Karnaugh map as shown below.
AB
CD

00

01
0

00

01

11

10

11
4

10
12

13

1
15

0
2

11

0
14

10

Follow the usual process to find the optimal sum of products expression. Assuming we make the
same arbitrary decisions we did in Example 7.8, the Karnaugh map will be grouped as follows:
AB
CD
00

00

01
0

1
1

01

11

10

11
4

1
7

15

Using this grouping, we derive the expression + +


expression and applying De Morgans theorem, we have:
+ +

11

0
14

0
13

10
12

10

0
+

. Complementing this

= ( + )( + )( + + )( +

+ )

It is a simple matter to verify that this expression is the same as the one obtained in Example 7.8

7.2 Dont Cares


Often, particularly when the inputs to a digital system are not independent, there will be input
combinations that can never happen. The question is, can we use these invalid input combinations
to simplify logic expressions even further? The short answer is yes.

The key to exploiting invalid input combinations is the dont care. A dont care is usually denoted by
the letter X but often the symbol or the letter d is used. This text will use the letter X. A dont care
(X) may be inserted in a truth table or Karnaugh map in the row or cell corresponding to the invalid
input. The implication is that when the invalid input is presented to the logic circuit, we just dont
care what the output is because it should never happen.
Consider a system that monitors the flow of fluid into a holding tank and raises an alarm, ALARM.L,
if either (a) the fluid level is too low and no fluid is flowing in, or (b) the fluid level is too high and
fluid keeps flowing in. The tank has two level sensors that generate signals EMPTY.L and FULL.L.
These signals are asserted when the fluid is below a low water mark or above a high water mark
respectively (See Figure 7-16). The feed pipe has a flow sensor that generates the signal FLOW.H.
This signal is asserted when fluid is flowing into the tank.

FLOW.H
FLOW SENSOR

Digital
Circuit

FULL.L

ALARM.L

HIGH LEVEL SENSOR


EMPTY.L
LOW LEVEL SENSOR

Figure 7-16. Fluid Tank Monitoring System.


If we write a truth table for this system, we quickly encounter input combinations that dont make
any sense. These are the cases where EMPTY and FULL are both true at the same time. Unless this
system is to be deployed in space or some other weightless environment, having EMPTY and FULL
true at the same time is impossible. We therefore enter dont cares into both the truth table and the
Karnaugh map for those invalid input combinations.
EMPTY FULL FLOW ALARM
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
1
1
0
0
1
1
0
1
0
1
1
0
X
1
1
1
X

EMPTY FULL
00

FLOW

01
0

11
2

0
1

10
6

X
7

Figure 7-17. Fluid Flow Monitor Truth Table and Karnaugh Map.
A dont care can be treated as either a 0 or a 1, whichever suits us. The key to grouping dont cares
in a Karnaugh map is this: Treat them as 1s if they can be used to make a group larger, otherwise
treat them as 0s that dont need to be covered. For the Karnaugh map in Figure 7-17, this means

we can use larger groups ( m(4,6) instead of m(6) and m(3,7) instead of m(3)). The final
grouping for this map is shown in Figure 7-18.
EMPTY FULL
00

FLOW

01

11
2

0
1

10
6

X
3

1
7

Figure 7-18. Karnaugh Map Grouping for the Fluid Flow Monitor.
Notice once again that the signal assertion levels are not relevant until it is time to implement the
logic circuit, but now that we have a logic expression, we can use the assertion levels to complete
the implementation (as explained in Chapter 5).
.

EMPTY.L

.
ALARM.L

FLOW.H

FULL.L

Figure 7-19 Generic Implementation of Fluid Flow Monitor.


As another example, recall the expression for controlling the hot water valve in Example 4.6:
HOT_VALVE = WASH (HOT

+ WARM

(7.2)

It is impossible for HOT and WARM to be true at the same time, therefore, we dont care what the
output of the system is in that case. The Karnaugh map with the appropriate dont care entries is
shown in Figure 7-19a.
HOT WARM
00

WASH LID

HOT WARM

01
0

00

01

11

10

11
4

0
1

12

X
5

0
3

13

15

(a)

00

00

01

11

10

11
4

0
1

13

0
15

X
6

0
2

10
12

0
3

10

01
0

11

1
14

WASH LID

0
2

10

11

1
14

X
(b)

Figure 7-19 Karnaugh Map for Hot Water Valve Controller with Dont Cares.

10

The optimal grouping for Figure 7-19a is shown in Figure 7-19b. Both m(10,11,14,15) and
m(6.14) are essential implicants, and no other 1s remain to be covered, so the simplest SOP
expression for the hot water valve controller is:
HOT_VALVE = HOTWASH + WARMWASH

(7.3)

In terms of number of operations, this is no simpler than Equation7.2, but if an SOP form is not
required, the distributive property (4.21a) can be applied to obtain a simpler expression:
HOT_VALVE = WASH (HOT + WARM

(7.4)

Example 7.10. Find the simplest SOP expression for the Karnaugh map. below.
AB
CD

00

01
0

00

11

10

1
13

X
7

0
15

1
2

0
5

10
12

0
1

01

11
4

11

X
6

0
14

10

Solution: The only essential implicant is m(0,2,8,10), looped in black below, because it is the only
prime implicant that covers cell 8. After that group is taken, the prime implicants that cover the
maximum number of uncovered 1s are m(1,5) and m(6,7,14,15), looped in green below. After
those groups are taken, there are no more uncovered ones, so the grouping is complete. Note that
there is an uncovered X in cell 13, but we dont care about that.
AB
00
01
11
10
CD
0

00

01

11

10

0
1

1
3

13

15

11

0
14

Using this grouping, we obtain the expression

12

+ .

10

7.3 Variable Entered Maps


Sometimes, particularly when there are more than four variables in an expression, we will want to
use a Variable Entered Map, or VEM to simplify logic expressions. With a VEM, each cell of the map
contains an expression that is ANDed with the minterm associated with the cells position. For
example, the VEM in Figure 7-20 represents the expression (0)+ ( )+ ( + )+ (1).
A
B

1
0

+D

Figure 7-20 A Simple 2-Variable VEM.


The VEM in Figure 7-20 is a 2-variable map, but it represents an expression of four variables. One
of the advantages of using VEMs is this ability to represent expressions with more variables than
the map size. If we can learn how to group and read VEMs, we can simplify expressions with five or
more variables, which is something that cannot be done with a Karnaugh map without resorting to
three dimensions.
Learning how to group VEMs is somewhat easier if we start with only one map entered variable.
Figure 7-20 has two map entered variables, C and D, so we will begin instead with the equivalent
VEM in Figure 7-21 whose only map entered variable is D.
AB
C

00

01
0

11
2

0
1

10
6

1
3

1
7

Figure 7-20 A Simple 3-Variable VEM.


There are several techniques that can be used to group and read VEMs; the one presented here is a
two-step process: First we group the map entered variables, then we create a reduced map and
group it. Map entered variables can be grouped with like variables or any other expression that can
absorb it. Specifically, if X is a map entered variable or expression, it can be grouped with Y if and
only if X+Y = Y. Now, let us turn our attention back to Figure 7-20. The first step is to group the
map entered variables, which in this case are (in cell 3) and (in cell 5). Variable can group
with the 1s because +1=1, but it cannot group with 0 or . Likewise, can group with 1 but not
with 0 or for a similar reason (Figure 7-21).

AB
C

00

01
0

11
2

0
1

10
6

Figure 7-21 A Simple 3-Variable VEM with the Map Entered Variables Grouped.
For each group, we write a term for the final expression that is the product of the grouped implicant
and the map entered variable or expression. The two groups in Figure 7-21 yield the terms
and
. The next step is to write a reduced map and simplify that. The reduced map is the same size
as the original VEM but contains no map entered variables. The rules for converting cells from the
VEM to the reduced map are given in Table 7-1.
Table 7-1 Conversion Rules for VEM Reduced Maps without Dont Cares
If a cell in the VEM contains:
0
A map-entered variable or expression
1, and the sum of the coverages is 1
1, and the sum of the coverages is not 1

The cell in the Reduced Map is


0
0
X
1

Cells 0, 1, and 2 in the VEM are 0, so the corresponding cells in the reduced map are also 0. Likewise, Cells 3 and 5 contain variables, so the corresponding cells are 0 as well. Cell 7 in the VEM is a
1 covered by a D loop and a loop. The sum of these coverages is D+ =1, so cell 7 in the reduced
map is X. Finally, cells 4 and 6 are 1s but are covered only by a loop, so these cells must be 1 in
the reduced map.
AB
C

00

01
0

11
2

0
1

10
6

1
3

1
7

Figure 7-22 Reduced Map for the VEM in Figure 7-21.


The reduced map is a Karnaugh map and is simplified in exactly the same way. This simplified
expression is then summed with the terms obtained earlier to get the final simplified expression. In
this case, the reduced map yields the expression , which is summed with the terms
and
obtained earlier to obtain:
+

(7.5)

Example 7.11 Find a logic expression in simplest SOP form for the VEM below.
AB
CD

00

01
0

00

01

11

11
4

1
1

E
5

1
3

10
12

0
13

1
7

15

11

0
2

0
6

10

14

10

Solution: The prime implicant m(10,14) is essential for E, and the prime implicants m(2),
m(13,15) and m(1,5,9,13) and are essential for . The only uncovered variable that remains is
one uncovered E (in cell 12), and the largest group that covers it is m(4,5,12,13). Looping these
implicants yields the terms
,
,
,
and (see below). The reduced map is
also shown below and it yields the simplified expression + .
AB
CD

00

01
0

00

01

11

1
1

12

13

15

00

01

11

10

11

14

01
0

10

13

0
15

0
6

0
2

10
12

X
3

11
4

0
6

00

1
7

CD

0
2

AB

10

1
3

10

11

11

0
14

10

The final simplified SOP expression, then, is the sum of these terms, or
+

+ .

The technique for simplifying VEMs with one map entered variable can also be employed to
simplify maps with two or more variables if a slight modification is made to the first step: If an
expression inside a cell is the sum of two or more terms, those terms must be grouped individually.
To illustrate this process, consider the map in Figure 7-20. Again, the first step is to group the map
entered variables or expressions (Figure 7-23), but note that and in cell 2 must be grouped
separately because + is the sum of two terms.

1
0

+D

Figure 7-23 Grouping a VEM with 2 Map Entered Variables.


Again, we write down the products of the grouped implicants and the map entered expressions to
obtain +
+
. The second step is to write the reduced map according to the rules in
Table 7-1, and simplify it. Cells 0, 1 and 2 in the reduced map are 0s and cell 3 is an X because the
sum of the coverages for that cell ( + +
) equals 1.
A

1
0

0
1

Figure 7-24 Reduced Map for the VEM in Figure 7-23.


This map requires no implicants, so the final expression consists entirely of the terms obtained in
the first step, or
+

(7.6)

The student is encouraged to verify that that this simplified expression is equivalent to the one
given with the VEM in Figure 7-20.
Example 7.11 Find a logic expression in simplest SOP form for the VEM below.
AB
CD

00

01
0

00

01

11
4

0
1

1
5

13

11

15

11

+
2

10

+
3

10
12

14

10

0
Continued on next page

Example 7.11, Continued.


Solution: Implicant m(1,3) is essential for EF. (EF can group with E+F because E+F absorbs EF.)
Implicant m(10,14) is essential for
. (Again, absorbs
.) Implicant m(1) is essential for E,
m(1,5,9,13) is essential for F, m(5,7,13,15) is essential for , and m(12,13,14,15) is essential
for . After the essential implicants have been taken, there are no uncovered map entered variables.
AB
CD

00

01
0

00

01

11
4

10
12

13

15

11

+
0

11
10

14

10

The expression (color coded to match the loops) so far is:

Cell 13 is covered by E+F+ =E+1=1, so it can be replaced by a dont care in the reduced map. Cells
8 and 12 are uncovered or not completely covered, so they must remain 1s in the reduced map:
AB
CD

00

01
0

00

01

11

10

0
1

13

0
15

0
6

0
2

10
12

0
3

The reduced map yields one more term,


get a final simplified expression:

11
4

11

0
14

10

, which is summed with the terms obtained earlier to


+

7.4 Variable Entered Maps with Dont Cares


VEMs can easily be extended to include dont cares simply by including the dont care (X) as a factor
in the map entered variables or expressions. The meaning of a map entered expressions with dont
cares can be a little tricky, however. It is best to start with only one map entered variable and work
up to multiple variables later. If there is only one map entered variable, there are nine map entered
expressions that can appear in a VEM cell. Those expressions and their meanings are given in Table
7-2.
Table 7-2 Possible Map Entered Expressions for a VEM with a Single Map-Entered Variable, E.
Map Entry
0
E
X
xE
x
1
xE+
E+x

What it means if the minterm for this cell is true


The expression is false.
If E=0, the expression is false. If E=1, the expression is true.
If E=0, the expression is true. If E=1, the expression is false.
The expression can be anything.
If E=0, the expression is false. If E=1, the expression can be anything.
If E=0, the expression can be anything. If E=1, the expression is false.
The expression is true.
If E=0, the expression is true. If E=1, the expression can be anything.
If E=0, the expression can be anything. If E=1, the expression is true.

The VEM can be filled from a truth table by grouping the rows so that each group corresponds to a
minterm in the map. In the case of one map entered variable, each group contains two rows. For
two variables there would be four rows per group. The output column of each group dictates what
the map entry will be for that group. For a single map entered variable, E, this conversion is
illustrated in Table 7-3.
Table 7-3 Conversion from Truth Table Output to a Map Entered Expression (one variable).
E
0
1
0
1
0
1

Output Map Entry


0
0
0
0
E
1
1
0

E
0
1
0
1
0
1

Ouput Map Entry


X
X
X
0
xE
X
X
x
0

E
0
1
0
1
0
1

Output Map Entry


1
1
1
1
xE+
X
X
E+x
1

For example, Figure 7-25 shows a truth table (grouped by minterm number in the map) and its
corresponding VEM. The student is encouraged to study the table and the VEM and verify that the
two are equivalent.
The rules for grouping must also be generalized to handle the dont cares. As usual, a map entered
variable or expression can be grouped with any other term that can absorb it, even if that term has
a dont care. Terms with dont cares dont need to be covered, but it is harmless if they are. Finally,

A
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1

B
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1

C
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1

D
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1

minterm
0
1
2
3
4
5
6
7

F
0
X
X
X
0
0
X
0
0
1
1
X
X
1
1
1

AB
C

00

01
0

xD

11
2

0
1

10
6

D+x
3

xD+

Figure 7-25. Truth table and corresponding VEM.


cells that contain or can evaluate to 1 translate to an X in the reduced map if the parts we care about
are completely covered. Otherwise they translate to a 1.
This last rule bears additional explanation. Recall that we can treat the value of a dont care (X) as
either a 0 or 1, whichever suits us. If, for example, a cell contains D+x and we treat the X as a 1,
then D+x = D+ = 1. Since this cell can evaluate to 1, it is not necessary to cover it in the first
simplification step (covering the map entered variables). If the terms we care about (in this case, D)
are covered, the cell translates to a dont care (X), otherwise it translates to a 1 and will have to be
covered in the reduced map. This will sometimes force us to make a decision: do we cover a cell in
the first step or the second. Usually the best choice is evident, but if there is some question we can
simplify both ways and select the better expression.
To illustrate this procedure, we will use it to find a simplified SOP expression for the VEM in Figure
7-25. The only term we must cover in the first step is the D in cell 4. Cells 0 and 3 can be used to
make groups larger, but do not need to be covered, and cells 5, 6 and 7 can evaluate to 1, so they
may be covered in the first step or handled by the reduced map in the second.
The D in cell 4 can group with terms in m(4,5,6,7) and yield the term BD, but now there is a
decision to make. If we cover with m(1,3,5,7), all the terms we care about (even the 1 in cell 7)
will be covered and the simplified logic expression,
+ , will be complete. On the other hand,
we can leave uncovered and handle it in the reduced map (Figure 7-26). If we do, the reduced
map yields the term AC, and the simplified logic expression is
+ . Neither expression is
simpler than the other, so we are free to use whichever we wish.
When multiple map entered variables are used, the task of translating from a truth table becomes
substantially harder, but a 4-variable map with two map entered variables is 64 rows long and is

AB

00

01
0

11
2

0
1

10
6

Figure 7-26 Reduced Map for the VEM in Figure 7-25.


quite unwieldy anyway. With practice, we can avoid truth tables altogether and go straight to VEMs
or logic expressions. The simplification technique presented in this section, however, can be used
without modification for VEMs with two or more map entered variables.
Example 7.12 Simplify the VEM below:
AB
CD

00

01
0

00

01

0
1

13

15

11

F
6

E+xF xE+x

EF
2

10
12

xF

11
10

11
4

0
14

10

Solution: The grouping for the first simplification step and the reduced map are shown below. Note
that cell 1 is completely covered by +E+ , so it is translated to a dont care in the reduced map.
AB
CD

00

01
0

00

01

0
1

12

13

00

01

11

11

14

01
0

0
5

0
15

0
6

The simplified SOP logic expression is:


+

13

0
2

10

10
12

0
3

10

11
4

00

15

F
6

CD

E+xF xE+x

EF

AB

10

xF

11
10

11

11

0
14

10

Exercises
1. Find simplified SOP logic expressions for the Karnaugh maps below.
AB
C

00

01

11

1
3

0
7

AB

10

00

01
0

0
1

AB

00

01

0
7

AB

10
6

1
1

1
7

(b)
11

10
6

(a)

11
2

00

01
0

0
1

11
2

1
3

(c)

10
6

1
7

(d)

2. Find simplified SOP logic expressions for the Karnaugh maps below.
AB

AB

00

CD

01
0

00

01

11

10

11
4

0
1

12

1
5

1
3

13

15

(a)

00

01

11

10

11
4

1
1

13

0
15

0
6

1
2

10
12

1
3

10

01
0

11

1
14

00

CD

1
2

10

11

0
14

10

(b)

3. Repeat problem 2 but find simplified POS logic expressions instead.


4. Draw a Karnaugh maps for each of the truth tables in Figure 7-P3. Do not simplify.
5. Draw a Karnaugh map for each of the logic expressions below. Do not simplify.

(a) =
+
+
(b) = ( + ) +
(c) = +

(a)

(c)
A

0
0
0
0
1
1
1
1
(b)
A

0
0
1
1
0
0
1
1

0
1
0
1
0
1
0
1

0
1
1
1
1
0
1
0

0
0
0
0
0
0
0
0
1
1

0
0
0
0
1
1
1
1
0
0

0
0
1
1
0
0
1
1
0
0

0
1
0
1
0
1
0
1
0
1

0
1
1
0
1
1
0
0
0
1

0
0
0
0
1
1
1
1

0
0
1
1
0
0
1
1

0
1
0
1
0
1
0
1

1
1
0
1
1
1
0
0

1
1
1
1
1
1

0
0
1
1
1
1

1
1
0
0
1
1

0
1
0
1
0
1

1
1
0
1
0
1

Figure 7-P3
6. Find simplified SOP logic expressions for the Karnaugh maps below.
AB
C

00

01
0

11
2

1
1

0
3

AB

10
4

X
7

00

01
0

1
1

AB

00

01
0

(c)

0
7

AB

10

0
7

(b)
11

10
6

(a)

11
2

00

01
0

11
2

0
1

10
6

1
3

X
(d)

0
5

7. Find simplified SOP logic expressions for the Karnaugh maps below.
AB

AB

00

CD

01
0

00

01

11

10

11
4

0
1

12

15

00

01

11

10

11

14

10

X
5

(a)

X
13

1
7

0
2

10
12

0
3

11
4

01
0

1
2

0
13

00

CD

1
3

10

0
15

11

X
6

X
14

10

(b)

8. Find simplified SOP logic expressions for the truth tables in Figure 7-P8, below.
(a)
A

(c)
B

0
0
0
0
0
0
0
0
1
1

0
0
0
0
1
1
1
1
0
0

0
0
1
1
0
0
1
1
0
0

0
1
0
1
0
1
0
1
0
1

X
0
1
1
1
0
X
0
X
1

1
1
1
1
1
1

0
0
1
1
1
1

1
1
0
0
1
1

0
1
0
1
0
1

1
0
1
1
1
X

0
0
0
0
1
1
1
1
(b)
A

0
0
1
1
0
0
1
1

0
1
0
1
0
1
0
1

1
0
1
X
1
X
0
1

0
0
0
0
1
1
1
1

0
0
1
1
0
0
1
1

0
1
0
1
0
1
0
1

X
1
X
0
0
1
0
X

Figure 7-P8

9. Find simplified SOP logic expressions for the VEMs below.


AB
C

00

01

11

D
7

AB

10

00

01
0

xD
1

AB

00

01

AB

10
6

D+E

xD
7

(b)
11

10
6

(a)

11
2

00

01
0

xD

E
1

(c)

11
2

10
6

1
3

DE

xE
7

(d)

10. Draw a 2x2 VEM for each of the truth tables in Figure 7-P10 and find the simplest SOP logic
expression for F. Treat D as a map-entered variable. Simplify.
(a)
A

(b)
A

0
0
0
0
1
1
1
1

0
0
1
1
0
0
1
1

0
1
0
1
0
1
0
1

1
0
1
X
X
0
0
X

0
0
0
0
1
1
1
1
Figure 7-P10

0
0
1
1
0
0
1
1

0
1
0
1
0
1
0
1

X
1
0
0
1
1
0
1

You might also like