# ENGR 2030 Simplification and Karnaugh Maps

Document Sample

```					                             ENGR 2030 Simplification and Karnaugh Maps

Topics
Simplification
MSOP, MPOS
Karnaugh Maps
Don’t Cares

Goals
Become familiar with minimization using k-maps
Understand how to treat don’t care terms in k-maps

Minimization Techniques
Goal of minimization (simplification) is find an equivalent expression with fewer terms and fewer literals
per term. This will result in a circuit with fewer gates and fewer inputs to each gates (cheaper and faster
circuit). One can simplify logic circuits using: Boolean Algebraic manipulation, Karnaugh maps (k-maps),
or Implicant Methods. K-maps are only practical for up to 5 or 6 input variables; anything more complex is
done with implicant methods like Quine-Mccluskey.

Karnaugh Maps
Simplification with k-maps is a graphical approach to simplification of Boolean expressions that directly
corresponds to simplifying using Boolean algebra and will result in a minimum sum of products (MSOP)
or minimum product of sums (MPOS). Recall that SOP implemented with AND – OR network, POS
implemented with OR – AND network.

A minimum sum of products (MSOP) expression is the simplest SOP expression equivalent to the original
expression. By simplest we mean as few terms as possible and as few literals per term as possible. More
precisely, a minimum sum of products (MSOP) is a SOP for which no other equivalent SOP expression has
fewer product terms and any SOP with the same number of product terms has as many or more literals. A
minimum product of sums (MPOS) is a POS for which no other equivalent POS expression has fewer sum
terms and any POS with the same number of sum terms has as many or more literals (simplest POS
expression equivalent to the original expression).

K-maps are composed of cells, one cell for each variable value combination of the inputs (one for each row
of the truth table). Thus a 3-variable k-map has eight cells and 4-variable k-map has 16 cells. The cells of
the k-maps in Figure 1 are numbered with the corresponding minterm number.

Figure 1, Two, Three, and Four Variable K-maps

In a k-map, the values of the input variables are arranged so that for any two physically adjacent squares
only one of the input variables has a different value (adjacent cells differ in only one bit position). In the 4-
variable k-map of Figure 1, cell 5 is adjacent to cells 1, 4, 7, and 13.
Cell 5 corresponds to minterm 5, m5 = A ⋅ B ⋅ C ⋅ D , which differs in only one variable position from
m1 = A ⋅ B ⋅ C ⋅ D , m4 = A ⋅ B ⋅ C ⋅ D , m7 = A ⋅ B ⋅ C ⋅ D , and m13 = A ⋅ B ⋅ C ⋅ D .

Adjacent may mean wrapped around at top, bottom, side edges, in the 4-variable k-map of Figure 1, cell 2
is adjacent to cells 0, 3, 6, and 10.

System Representations
Truth tables, k-maps, CSOP, and CPOS expressions contain equivalent information. Each row in the truth
table corresponds to a cell in the k-map. Truth table rows with 1 outputs give 1 in cell of k-map (minterms
in CSOP have 1s in cell in k-map).

The truth table of Figure 2a, the k-map of Figure 2b, the CSOP expression   F = ∑ ABC (0,3,4,5) , and the
MSOP expression F = B ⋅ C + A ⋅ B + A ⋅ B ⋅ C are equivalent representations of a system.

ABC        F
000        1
001        0
010        0
011        1
100        1
101        1                                Figure 2b, 3-variable k-map
110        0
111        0
Figure 2a, 3-variable Truth Table

The CSOP expression can be obtained from the k-map by finding. the minterms with true outputs and
summing them

Minimization using Karnaugh Maps
Consider the truth table and k-map of Figure 3a and 3b.

UVW              F
000             1
001             1
010             0
011             0
100             1
101             0
110             1
111             1                  Figure 3b, Corresponding K-map
Figure 3a, truth Table

To find the MSOP from the k-map, we group adjacent ones. For each group we will write a simplified
product (AND) term, and the MSOP will be all the product terms ORed together. Using the three groups
formed by grouping m0 and m1, m6 and m7, and m0 and m4 (Figure 4), we obtain the product terms
Group m0,m1 gives U ⋅ V ⋅ W + U ⋅ V ⋅ W = U ⋅ V
Group m6, m7 gives U ⋅ V ⋅ W + U ⋅ V ⋅ W + = U ⋅ V
Group m0,m4 gives U      ⋅V ⋅W + U ⋅V ⋅W = V ⋅W
And the MSOP is then
F = U ⋅V + U ⋅V + V ⋅W
Figure 4, k-map with Groupings Circled

Formal Method for Simplification with Karnaugh Maps
An implicant is a group covering only adjacent 1s (SOP). The size of an implicant group must be power of
2 (legal groups are groups of 1, 2, 4, 8, etc). A prime implicant is a group covering adjacent 1s that is as
large as possible. An essential prime implicant (EPI) is a group that contains a 1 that is only covered by one
prime implicant group (contains a 1 that can only be grouped one way). A non-essential prime implicant
(NEPI) is a group containing a 1 that can be covered by more than one prime implicant group

To simplify an expression using a k-map
Form the Karnaugh map
Identify all essential and non-essential prime implicants for the 1s in the k-map
Form a product term (evaluating to 1) for each EPI, EPI terms must be included in the MSOP
Form product terms for enough NEPI to cover any remaining 1s, use as few groups as possible
Form MSOP using the formed product terms

For our example of Figures 3 and 4
EPI:U ⋅V , U ⋅V
NEPI: V ⋅ W , U ⋅ W
MSOP is either F = U ⋅ V + U ⋅ V + V ⋅ W or F = U ⋅ V + U ⋅ V + U ⋅ W

Summarizing the procedure for finding the MSOP from a k-map.
Circle every one at least once.
Circle a one more than once if this allows you to make a larger grouping, but do not circle ones any
more times than necessary to circle all the ones.
Make each group of ones as large as possible.
Use no more groups than necessary.
Start by circling the ones that can only be circled in one way, i.e. start with the ones that are hardest to
group.

The MPOS is found similar to MSOP
Form the Karnaugh map
Identify all EPI and NEPI for 0s in the k-map
Form a sum term (evaluating to 0) for each EPI, EPI terms must be included in the MPOS
Form sum terms for enough NEPI to cover any remaining 0s, use as few groups as possible
Form MPOS using the formed sum terms

(        )
For the Karnaugh map of Figure 3b, the EPI terms for the MPOS are U + V and U + V + W . (             )
Remember when writing sum terms that evaluate to false, complement a variable whose value is one and
(        )(
leave a variable uncomplemented if its value is zero. The MPOS is F = U + V ⋅ U + V + W .            )
More on Forming Prime Implicant Terms
Prime implicants are adjacent groups of cells that are as large as possible (cells with 1s for MSOP and cells
with 0s for MPOS). When forming the product terms for the MSOP or sum terms for MPOS, a group of 2n
adjacent cells will result in n variables dropping out of the resulting term. Product term that evaluates to 1
(or sum terms that evaluate to 0) are written for remaining variables. Groups of two cells have one variable
drop out of the product term, groups of four cells have two variables drop out, groups of eight cells have
three variables drop out, etc.

Consider minimizing the Boolean function F =       ∑  UVWX
(0,4,6,12,13,14) . The k-map corresponding to
the CSOP is shown in Figure 5a while the same k-map with circled groups is shown in Figure 5b

Figure 5a, 4-variable K-map                     Figure 5b, Groups for 1s

The prime implicant groups are one group of four (m4, m6, m12, m14) and two groups of two (m0, m4)
and (m12, m13). For the group of four, two variables will drop out of the resulting product term and for the
groups of two, one variable will drop out of the resulting product term.
(m4, m6, m12, m14),  U ⋅V ⋅W ⋅ X + U ⋅V ⋅W ⋅ X + U ⋅V ⋅W ⋅ X + U ⋅V ⋅W ⋅ X = V ⋅ X
(m0, m4), U ⋅ V ⋅ W ⋅ X + U ⋅ V ⋅ W ⋅ X = U ⋅ W ⋅ X
(m12, m13), U ⋅ V ⋅ W ⋅ X + U ⋅ V ⋅ W ⋅ X = U ⋅ V ⋅ W
The MSOP for the k-map of Figure 5a is F = U ⋅ W ⋅ X + V ⋅ X + U ⋅ V ⋅ W .

Notice that only the literals that are common to all the minterms end up in the resulting prime implicant
term. Any variable whose value takes one more than one value in the group is dropped from the term.
Product terms are written so they evaluate to one for the remaining variable values in the group, i.e. literals
are uncomplemented for values of one and complemented for values of zero. Sum terms are written so they
evaluate to 0 for the remaining variable values in the group, i.e. literals are uncomplemented for values of
zero and complemented for values of one.

Consider finding the MPOS for the Boolean function
F = ∑UVWX (3,4,5,6,11,12,13,14) = ∏UVWX (0,1,2,7,8,9,10,15)
The k-map and k-map with circled implicant groups (for 0s) are shown in Figure 6a and 6b

We can form two groups of four (one is the four corners) and one group of two. All the implicants are EPI
(
giving the MPOS F = (V + W ) ⋅ (V + X ) ⋅ V + W + X            )
Figure 6a, Karnaugh Map                       Figure 6b, Groups for 0s

Don’t Care Terms
There are times when the output is not defined for certain input combinations or certain combinations
cannot occur. This leads to an incompletely specified problem. We could assign true or false output values
for these input combinations to ensure safety or more reliable operation or we could take advantage of the
incomplete specification to attempt to further simplify the expressions and the resulting circuit, in this case
represent unspecified outputs as don’t cares (Xs) and use them as either 1s or 0s whichever gives more
simplification.

```
DOCUMENT INFO
Shared By:
Categories:
Stats:
 views: 258 posted: 5/27/2010 language: English pages: 5