=
 m(
4,5,6,8,9,10,13)
+
d(
0,7,15)
. Table 2.1 shows the structure of a Quine-McCluskey implicant table. The first column contains the min-terms of the on-set, that is, single points in the Boolean space. In the example, each of these represents a four-variable product term (
a min-term)
. As a result of applying the method, the second column will contain implicants that form edges in the Boolean space: three-variable product terms. After another iteration of the method, the third column will contain larger implicants that represent planes in the Boolean space: two-variable terms. A third iteration will find implicant cubes in the space: one-variable terms.
We begin the method by filling in the first column of the table as follows. Each group of the min-term indices of the on-set and don't care set is separated by a blank line. The first group has no 1's in the indices, the second has one 1 in each index, the third has two 1's in each index, and so on.
To apply the uniting theorem systematically, compare the elements in the first group against each element in the second. If they differ by a single bit, it means that the min-terms the numbers represent are adjacent in n-dimensional Boolean space. For example, 0000 =
and 0100 =
can be combined into the implicant according to the uniting theorem. The latter term is represented symbolically by 0-00. Every time a new implicant is formed, it is placed in the next column. Since each group differs in its 1's count by one, it is sufficient to restrict comparisons to adjacent groups to detect when the uniting theorem can be applied.
Let's apply the Quine-McCluskey algorithm to the whole first column. We begin with the first group (
no 1's)
against the second group (
one 1's)
. 0000 is compared against 0100 and 1000, yielding terms for the second column of 0-00 and -000 respectively. Every time a term con-tributes to a new implicant, it receives a check mark. This means that the implicant is not prime: it can be combined with some other element to form a larger implicant.
We repeat for the second group against the third group. 0100 combines with 0101 and 0110, giving 010- and 01-0 in the second column. 1000 combines with 1001 and 1010, resulting in 100- and 10-0.
Now we try the third group against the fourth group. 0101 combines with 0111 and 1101 to give 01-1 and -101. 0110 combines with 0111 to yield 011-. 1001 combines with 1101 to give 1-01. 1010 does not combine with any element of the fourth group.
When we compare the fourth to the fifth group, two additional terms are added: -111 and 11-1.
The procedure is repeated for the groups in column II. For the elements to be combined, they must differ by a single bit and must have their "-" in the same bit position. The elements of the first group do not combine with any elements of the second group. We mark these with asterisks because they are prime implicants: we have expanded them as much as possible.
In the second and third groups, 010- can be combined with 011-, yielding 01-- for the third column. 01-0 and 01-1 are combined to derive the same condensed term. 100- and 10-0 cannot be combined further and are prime implicants.
Between the third and fourth groups only the additional term -1-1 is added to the third column, derived from the combinations of -101 and -111, and 01-1 and 11-1.
The elements of the third column cannot be reduced further. Both are marked as prime implicants. Since no new implicants are added, we have found all prime implicants, and the first phase of the algorithm can now terminate.
The algorithm has found the following prime implicants:
These are shown circled in the K-map of Figure 2.53.0-00 =
-000=
100-=
10-0=
1-01=
01--=
-1-1=
They are exactly the same as the prime implicants we found in the previous section. Note that in this portion of the procedure, the don't cares have been treated as though they are 1's.
Finding the Minimum Cover The second step of the method is to find the smallest collection of prime implicants that cover the complete on-set of the function. This is accomplished through the prime implicant chart (
as opposed to the implication chart used in the first phase)
, as shown in Figure 2.54.
The prime implicant chart is organized as follows. The columns are labeled with the min-term indices of the on-set. Note that don't cares are not included in this stage. The rows are labeled with the min-terms covered by a given prime implicant. This is done by taking the indices of the prime implicant representation and replacing each "-" by all possible combinations of 1's and 0's. For example, -1-1 becomes 0101, 0111, 1101, 1111, which are the indices of the min-terms m5, m7, m13, and m15. An X is placed in the (
row, column)
location if the min-term represented by the column is covered by the prime implicant associated with the row. The initial configuration is given in Figure 2.54(
a)
.
Next, we look for essential prime implicants. These are immediately apparent whenever there is a single X in any column. This means that there is a min-term that is covered by one and only one prime implicant. The essential prime implicants must participate in the final cover. We place a line through the column and row in which the essential prime implicant has been found and place a box around the prime. This is shown in Figure 2.54(
b)
.
The essential prime implicants usually cover additional min-terms. We cross out any columns that have an X in a row associated with an essential prime. These min-terms are already covered by the essential primes. This is shown in Figure 2.54(
c)
.
In the example, two min-terms are still uncovered, represented by the columns 9 and 13. The final step is to find as few primes as possible that cover the remaining min-terms. In our example, the single prime implicant 1-01 covers both of these. Adding it to the two essential prime implicants already found completes the cover. This is shown in Figure 2.54(
d)
. The solution found here is identical to the one we found earlier in Figure 2.50.
(
see Brayton et al. in the chapter references)
, the basic ideas employed by the program are not difficult to understand. They are as follows: (
that is, one for which no proper subset is also a cover)
is extracted from the expanded implicants. The method is essentially the same as the Quine-McCluskey prime implicant chart method. This step is called IRREDUNDANT COVER. (
a)
early identification and extraction of essential prime implicants, so they need not be revisited during step 4; (
b)
using the function's complement to check efficiently whether an EXPAND step actually increases the coverage of the function (
the min-terms covered by an expanded implicant may already be covered by another expanded implicant, so the newly expanded implicant should not be placed in the cover)
; and (
c)
a special "last gasp" step which guarantees that no single prime implicant can be added to the cover in such a way that two primes can then be eliminated. The first two lines describe the number of inputs and outputs of the function. The next two describe the input symbol names and the name of the output function. The next line gives the number of product terms used in specifying the function. In this case, there are 10 terms: seven 1's and three don't cares. Each term is listed by its min-term index, encoded in binary, followed by a 1 or a "-." The latter indicates a don't care. The last line indicates the end of the list of product terms.
The output minimized truth table is shown in Figure 2.56.
The first four lines have the same meaning as before. The encoding for the minimum cover is identical to that used in the Quine-McCluskey method. 1-01 corresponds to , 10-0 to , and 01-- to .
To see how the iteration of REDUCE, IRREDUNDANT COVER, and EXPAND can improve the cover, consider the four-variable K-map of Figure 2.57.
Figure 2.57(
a)
shows the primes as found by espresso after executing steps 1 and 2 for the first time. It has four prime implicants and is an irredundant cover, but this is not the minimum cover possible.
The results of the REDUCE step are shown in Figure 2.57(
b)
. The prime implicant has been reduced to the implicant (
no longer prime)
, and has been reduced to (
also no longer prime)
. The particular choice of reductions depends on heuristics and espresso's order of execution. The result of the second iteration of EXPAND is shown in Figure 2.57(
c)
. Espresso retains the last irredundant cover, and its expansion algorithms guarantee that it never generates the same cover twice. The IRREDUNDANT COVER extracted by espresso is given in Figure 2.57(
d)
. The three-product-term cover is indeed an improvement on the original result.