Vous êtes sur la page 1sur 8

Book Id: B0680

6)Discuss McClusky method


The Quine-McCluskey method is an exact algorithm which finds a minimum-cost sum-of-products
implementation of a Boolean function. This handout introduces the method and applies it to several
examples.
There are 4 main steps in the Quine-McCluskey algorithm:
1. Generate Prime Implicants
2. Construct Prime Implicant Table
3. Reduce Prime Implicant Table
1. Remove Essential Prime Implicants
2. Row Dominance
3. Column Dominance
4. Solve Prime Implicant Table
Note: For this course, you are not responsible for Step #1 on this handout: the method for
generating all prime implicants of a Boolean function. You can look over this method, but you will
be learning, and be responsible for, a more powerful modern prime-generation technique in a few
weeks.
In Step #1, the prime implicants of a function are generated using an iterative procedure. In Step #2,
a prime implicant table is constructed. The columns of the table are the prime implicants of the
function. The rows are minterms of where the function is 1, called ON-set minterms. The goal of the
method is to cover all the rows using a minimum-cost cover of prime implicants.
The reduction step (Step #3) is used to reduce the size of the table. This step has three sub-steps
which are iterated until no further table reduction is possible! At this point, the reduced table is
either (i) empty or (ii) non-empty. If the reduced table is empty, the removed essential prime
implicants form a minimum-cost solution. However, if the reduced table is not empty, the table
must be ``solved'' (Step #4). The table can be solved using either ``Petrick's method'' or the
``branching method''. This handout focuses on Petrick's method. The branching method is discussed
in the books by McCluskey, Roth, etc., but you will not be responsible for the branching method.
The remainder of this handout illustrates the details of the Quine-McCluskey method on 3
examples. Example #1 is fairly straightforward, Examples #2 is more involved, and Example #3
applies the method to a function with ``don't-cares''. But first, we motivate the need for column
dominance and row dominance.

Column Dominance
Consider the following Karnaugh map of a 4-input Boolean function:

There are 5 prime implicants, each of which covers 2 ON-set minterms. First, we note that two
implicants are essential prime implicants: and . These implicants must be added to
the final cover. There are 3 remaining prime implicants. We must pick a minimum subset of these
to cover the uncovered ON-set minterms.
Here is the prime implicant table for the Karnaugh map. The 5 prime implicants are listed as
columns, and the 6 ON-set minterms are listed as rows.

(0,4) (4,5) (5,13) (13,15) (11,15)


0 X
4 X X
5 X X
11 X
13 X X
15 X X
We cross out columns and and mark them with asterisks, to indicate that these are
essential. Each row intersected by one of these columns is also crossed out, because that minterm is
now covered. At this point, prime implicant covers 2 remaining ON-set minterms ( and
). However, prime implicant covers only one of these (namely, ), as does
(namely, ). Therefore we can always use instead of either or , since it
covers the same minterms. That is, column-dominates , and column-
dominates . The dominated prime implicants can be crossed out, and only column
remains.

Row Dominance
Consider the following Karnaugh map of a 4-input Boolean function:

There are 4 prime implicants: , , and . None of these is an essential prime


implicant. We must pick a minimum subset of these to cover the 5 ON-set minterms. Here is the
prime implicant table for the Karnaugh map. The 4 prime implicants are listed as columns, and the
5 ON-set minterms are listed as rows.

(1,2,3) (1,5) (1,3,5,7) (2,3,7)


1 X X X
2 X X
3 X X X
5 X X
7 X X
Note that row 3 is contained in three columns: , , and . Row 2 is covered by two of
these three columns: and , and row 7 is also covered by two of these three columns:
and . In this case, any prime implicant which contains row 2 also contains row 3.
Similarly, any prime implicant which contains row 7 also contains row 3. Therefore, we can ignore
the covering of row 3: it will always be covered as long as we cover row 2 or row 7. To see this,
note that row 3 row dominates row 2, and row 3 row dominates row 7. The situation is now the
reverse of column dominance: we cross out the dominating (larger) row. In this case, row 3 can
be crossed out; it no longer needs to be considered.
3.Explain Karnaugh maps with your own examples illustrating the formation.
The logic simplification examples that we have done so could have been performed with
Boolean algebra about as quickly. Real world logic simplification problems call for larger
Karnaugh maps so that we may do serious work. We will work some contrived examples in
this section, leaving most of the real world applications for the Combinatorial Logic chapter.
By contrived, we mean examples which illustrate techniques. This approach will develop the
tools we need to transition to the more complex applications in the Combinatorial Logic
chapter.
We show our previously developed Karnaugh map. We will use the form on the right.

Note the sequence of numbers across the top of the map. It is not in binary sequence which would
be 00, 01, 10, 11. It is 00, 01, 11 10, which is Gray code sequence. Gray code sequence only
changes one binary bit as we go from one number to the next in the sequence, unlike binary. That
means that adjacent cells will only vary by one bit, or Boolean variable. This is what we need to
organize the outputs of a logic function so that we may view commonality. Moreover, the column
and row headings must be in Gray code order, or the map will not work as a Karnaugh map. Cells
sharing common Boolean variables would no longer be adjacent, nor show visual patterns. Adjacent
cells vary by only one bit because a Gray code sequence varies by only one bit.
If we sketch our own Karnaugh maps, we need to generate Gray code for any size map that we may
use. This is how we generate Gray code of any size.

Note that the Gray code sequence, above right, only varies by one bit as we go down the list, or
bottom to top up the list. This property of Gray code is often useful in digital electronics in general.
In particular, it is applicable to Karnaugh maps.
Let us move on to some examples of simplification with 3-variable Karnaugh maps. We show how
to map the product terms of the unsimplified logic to the K-map. We illustrate how to identify
groups of adjacent cells which leads to a Sum-of-Products simplification of the digital logic.

Above we, place the 1's in the K-map for each of the product terms, identify a group of two, then
write a p-term (product term) for the sole group as our simplified result.
Mapping the four product terms above yields a group of four covered by Boolean A'

Mapping the four p-terms yields a group of four, which is covered by one variable C.

After mapping the six p-terms above, identify the upper group of four, pick up the lower two cells
as a group of four by sharing the two with two more from the other group. Covering these two with
a group of four gives a simpler result. Since there are two groups, there will be two p-terms in the
Sum-of-Products result A'+B

The two product terms above form one group of two and simplifies to BC
Mapping the four p-terms yields a single group of four, which is B

Mapping the four p-terms above yields a group of four. Visualize the group of four by rolling up the
ends of the map to form a cylinder, then the cells are adjacent. We normally mark the group of four
as above left. Out of the variables A, B, C, there is a common variable: C'. C' is a 0 over all four
cells. Final result is C'.

The six cells above from the unsimplified equation can be organized into two groups of four. These
two groups should give us two p-terms in our simplified result of A' + C'.

Below, we revisit the Toxic Waste Incinerator from the Boolean algebra chapter. See Boolean
algebra chapter for details on this example. We will simplify the logic using a Karnaugh map.
The Boolean equation for the output has four product terms. Map four 1's corresponding to the p-
terms. Forming groups of cells, we have three groups of two. There will be three p-terms in the
simplified result, one for each group. See "Toxic Waste Incinerator", Boolean algebra chapter for a
gate diagram of the result, which is reproduced below.

Below we repeat the Boolean algebra simplification of Toxic waste incinerator for comparison.
Example 1:
Consider the following map. The function plotted is: Z = f(A,B) = A + AB

• Note that values of the input variables form the rows and columns. That is the logic values
of the variables A and B (with one denoting true form and zero denoting false form) form
the head of the rows and columns respectively.
• Bear in mind that the above map is a one dimensional type which can be used to simplify an
expression in two variables.
• There is a two-dimensional map that can be used for up to four variables, and a three-
dimensional map for up to six variables.
Using algebraic simplification,
Z=A + AB

Z = A( + B)

Z=A

Variable B becomes redundant due to Boolean Theorem T9a.


Referring to the map above, the two adjacent 1's are grouped together. Through inspection it can be
seen that variable B has its true and false form within the group. This eliminates variable B leaving
only variable A which only has its true form. The minimised answer therefore is Z = A.

Vous aimerez peut-être aussi