• No results found

Map (Karnaugh maps )Rules and Simplification:

In document Digital Logic Design Notes (Page 40-45)

Multivariable Theorems:

K- Map (Karnaugh maps )Rules and Simplification:

Minimization with Karnaugh Maps

Overview

° K-maps: an alternate approach to representing Boolean functions

° K-map representation can be used to minimize Boolean functions

° Easy conversion from truth table to K-map to minimized SOP representation.

° Simple rules (steps) used to perform minimization

° Leads to minimized SOP representation.

• Much faster and more more efficient than previous minimization techniques with Boolean algebra.

• All rows of truth table represented with a square

• Each square represents a minterm

° Easy to convert between truth table, K-map, and SOP

• Unoptimized form: number of 1’s in K-map equals number of minterms (products) in SOP

• Optimized form: reduced number of minterms Karnaugh Maps - Rules of Simplification

The Karnaugh map uses the following rules for the simplification of expressions by grouping together adjacent cells containing ones

Groups may not include any cell containing a zero

Groups may be horizontal or vertical, but not diagonal.

Groups must contain 1, 2, 4, 8, or in general 2n cells.

That is if n = 1, a group will contain two 1's since 21 = 2.

If n = 2, a group will contain four 1's since 22 = 4.

Each group should be as large as possible.

Each cell containing a one must be in at least one group.

Groups may overlap.

Groups may wrap around the table. The leftmost cell in a row may be grouped with the rightmost cell and the top cell in a column may be grouped with the bottom cell.

There should be as few groups as possible, as long as this does not contradict any of the previous rules.

Summary:

1. No zeros allowed.

2. No diagonals.

3. Only power of 2 number of cells in each group.

4. Groups should be as large as possible.

5. Every one must be in at least one group.

6. Overlapping allowed.

7. Wrap around allowed.

8. Fewest number of groups possible.

Karnaugh Maps

A Karnaugh map is an array containing 2k cells where k is the number of variables in the DNF expression to be minimized. Each cell of the Karnaugh map corresponds to one row of the truth table, or one assignment of truth values to the variables of the expression. The cells of a

Karnaugh map are arranged so that conjunctions which differ on only one variable are adjacent to each other.

2-Variable Karnaugh Maps

A 2-variable Karnaugh map has four cells. The map looks like this:

The cells on the top row represent the conjunctions (x and y) and (not x and y). The cells on the bottom row represent (x and not y) and (not x and not y).

When given a DNF to be minimized, put a 1 in each cell of the Karnaugh map for which there is a conjunction in the DNF. Then group the cells into groups which contain a power of two cells;

that is, make groups of size 2 or 4. When we get to larger Karnaugh maps you will be able to make groups of size 8 or 16. Members of groups must to adjacent to one another either horizontally or vertically, and groups must be rectangular in shape. L-shaped groups are not allowed.

Let's use a Karnaugh map to minimize the following DNF:

_ _ _ _ x y + x y + x y

Here is the Karnaugh map with the appropriate 1's placed in cells and then grouped:

The only group that we can make that has the upper right cell in it is the pair in the second

column. And the only group that contains the lower left cell is the pair in the second row. Note that we can use the lower right cell in both groups.

Once you have grouped cells, you can determine the minimized logical expression. Each group reduces to one conjunction in the minimized expression. A group reduces to a conjunction containing just those literals that remain the same for every cell in the group. For example, the group in the above Karnaugh map that contains the two cells in the second column reduces to the expression "not x" because both of its members have a "not x" in their DNF conjunctions.

The group consisting of both cells in the bottom row reduces to "not y". Thus the minimized logical expression is

_ _ x + y

3-Variable Karnaugh maps

Here is a 3-variable Karnaugh map:

In this map, the largest possible group size is 8. A group of size 8, of course, reduces to true.

We can also make groups of size 4 or 2. It is important to understand that the leftmost column in this Karnaugh map is considered to be adjacent to the rightmost column. Thus we can create groups like this one of size 4:

That group reduces to the expression y.

When grouping 1's, the object is to get every 1 into as large a group as possible. Sometimes it is not possible to put a cell into a group; in that case, the minimized expression will contain one conjunction for that cell all by itself. As before, if it helps make larger groups we can put a cell in more than one group.

Use a Karnaugh map to minimize the following DNF:

_ _ _ _ _ _ _ _ _ x y z + x y z + x y z + x y z + x y z + x y z

Here is the Karnaugh map:

The reduced expressions

_ _ _ x z + y + x z

The worst case situation when attempting to minimize a DNF is to end up with a Karnaugh map that looks like a checkerboard. In such a case, no minimization is possible.

4-Variable Karnaugh Maps

A 4-variable Karnaugh map looks like this:

In a map of this size, we can have groups of size 16, 8, 4, or 2. You must realize that the leftmost column is considered to be adjacent to the rightmost column and that the top row is adjacent to the bottom row. Here are some 4-variable Karnaugh maps and the resulting

In document Digital Logic Design Notes (Page 40-45)

Related documents