Quine–McCluskey — worked example
Digital Logic 101 · Quine–McCluskey · Example
Minimise F(A,B,C) = Σm(0, 1, 2, 5, 6, 7)
Six minterms over three variables. We’ll run all three QM stages by hand and arrive at the same answer the live reducer produces. The classroom-canonical result is — three two-cell implicants — which the chart will pare down to the minimum cover.
Stage 1 — list and group by ones-count
Minterm Binary Ones m0 000 0 m1 001 1 m2 010 1 m5 101 2 m6 110 2 m7 111 3
Four groups by ones-count: {m0} (0 ones), {m1, m2} (1 one), {m5, m6} (2 ones), {m7} (3 ones). Combine pairs from adjacent groups that differ in exactly one bit.
Column 2 — first combinations
- m0 (000) + m1 (001) differ in bit C → 00– (covers {0,1}).
- m0 (000) + m2 (010) differ in bit B → 0–0 (covers {0,2}).
- m1 (001) + m5 (101) differ in bit A → –01 (covers {1,5}).
- m2 (010) + m6 (110) differ in bit A → –10 (covers {2,6}).
- m5 (101) + m7 (111) differ in bit B → 1–1 (covers {5,7}).
- m6 (110) + m7 (111) differ in bit C → 11– (covers {6,7}).
Every original minterm combined into something larger, so all of column 1 is ticked. Column 2 has six 2-cell implicants.
Column 3 — try to combine again
Two column-2 entries combine when they have the same dash position and differ in exactly one of the remaining bits.
00– (0,1) vs –01 (1,5) different dash pos → no 00– (0,1) vs 11– (6,7) different bits, dash pos same but other bits differ in 2 → no 0–0 (0,2) vs –10 (2,6) different dash pos → no –01 (1,5) vs 1–1 (5,7) different dash pos → no ... (every other pair fails the same way)
Stage 2 — PI chart
PI m0 m1 m2 m5 m6 m7 00– (A'B') × × 0–0 (A'C') × × –01 (B'C) × × –10 (BC') × × 1–1 (AC) × × 11– (AB) × ×
- m0 is covered only by 00– and 0–0 — two PIs, so m0 alone doesn’t identify an essential.
- m1 is covered only by 00– and –01 — same story.
- No column has exactly one × in this chart. It’s cyclic — every minterm has two covers.
- Petrick or by-eye covering: any cover of size 3 works. A clean choice is = , three 2-literal terms covering all six minterms.
Combine
F = A'B' + BC' + AC (3 terms, 6 literals)From six 3-literal minterms (18 literals) down to a 6-literal SOP. Compare with the live answer on the Simulate page — the engine’s greedy cover may pick a different but equivalent 3-term combination.