Sub topic 15
Prime Implicant Chart and Choosing a Minimal Cover
Prerequisites and purpose
Assume you can read binary minterms, form Boolean expressions, and identify prime implicants from a Karnaugh map or the Quine-McCluskey method.
A prime implicant chart chooses a set of prime implicants that covers every required minterm. A cover is complete when every minterm where the function must be 1 appears in at least one selected row. A minimal cover uses the fewest terms. If several covers use the same number of terms, compare their literal counts or gate costs.
Consider:
\[ F(A,B,C)=\Sigma m(0,1,2,5,6,7) \]
The prime implicants are:
- P1 = B'C, covering 1 and 5
- P2 = BC', covering 2 and 6
- P3 = A'C', covering 0 and 2
- P4 = A'B', covering 0 and 1
- P5 = AC, covering 5 and 7
- P6 = AB, covering 6 and 7
Constructing the chart
Place each required minterm in a column. Mark an X when a prime implicant covers that minterm.
| Prime implicant | Expression | 0 | 1 | 2 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| P1 | B'C | X | X | ||||
| P2 | BC' | X | X | ||||
| P3 | A'C' | X | X | ||||
| P4 | A'B' | X | X | ||||
| P5 | AC | X | X | ||||
| P6 | AB | X | X |
A column with exactly one X identifies an essential prime implicant. Select every essential prime implicant immediately. In this example, no column has exactly one X, so there are no essential prime implicants.
Choosing a minimal cover
When no essential prime implicant exists, test combinations of rows. The selection must cover every column.
One valid selection is P2, P4, and P5:
\[ F = BC' + A'B' + AC \]
These rows cover:
- P4: minterms 0 and 1
- P2: minterms 2 and 6
- P5: minterms 5 and 7
Each prime implicant covers two minterms, and there are six required minterms. Therefore, at least three rows are necessary. This three-row cover is minimal by term count.
Another three-row cover is P1, P3, and P6:
\[ F = B'C + A'C' + AB \]
Both covers use three terms and six literals. If a problem gives a different cost model, such as gate count or fan-in limits, use that model to choose between tied covers.
from itertools import combinations
required = {0, 1, 2, 5, 6, 7}
primes = {
"P1": {1, 5},
"P2": {2, 6},
"P3": {0, 2},
"P4": {0, 1},
"P5": {5, 7},
"P6": {6, 7},
}
for size in range(1, len(primes) + 1):
covers = []
for choice in combinations(primes, size):
covered = set().union(*(primes[name] for name in choice))
if required <= covered:
covers.append(choice)
if covers:
print(f"Minimum number of terms: {size}")
print("Minimum covers:", covers)
breakChart selection process
Exercise
For F(A,B,C) = Σm(0,1,2,5,6,7), select P1, P3, and P6. Does this form a complete cover, and what expression does it produce?
Show answer
Yes. P1 covers 1 and 5, P3 covers 0 and 2, and P6 covers 6 and 7. The expression is F = B'C + A'C' + AB.