Quine-McCluskey method
1. First principles: what are we even doing?
2. The algorithm (WHAT / HOW)
Goal: minimize .
Step 0 — List minterms in binary, group by number of 1s
Grouping by 1-count guarantees you only ever compare adjacent groups (a Hamming-1 neighbour must differ in exactly one 1).
| Group (#1s) | Minterm | ABCD |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 1 | 2 | 0010 |
| 1 | 8 | 1000 |
| 2 | 5 | 0101 |
| 2 | 6 | 0110 |
| 2 | 9 | 1001 |
| 2 | 10 | 1010 |
| 3 | 7 | 0111 |
| 3 | 14 | 1110 |
Step 1 — Combine adjacent groups (size-2 terms)
Compare each term with every term in the next group. If they differ in one bit, combine and put - at that position. Tick (✓) every term that gets used (a ticked term is not prime by itself).
| Pair | ABCD |
|---|---|
| 0,1 | 000- |
| 0,2 | 00-0 |
| 0,8 | -000 |
| 1,5 | 0-01 |
| 1,9 | -001 |
| 2,6 | 0-10 |
| 2,10 | -010 |
| 8,9 | 100- |
| 8,10 | 10-0 |
| 5,7 | 01-1 |
| 6,7 | 011- |
| 6,14 | -110 |
| 10,14 | 1-10 |
Step 2 — Combine again (size-4 terms)
Two size-2 terms combine only if they have - in the same position AND differ in one bit.
| Quad | ABCD |
|---|---|
| 0,1,8,9 | -00- |
| 0,2,8,10 | -0-0 |
| 2,6,10,14 | --10 |
No size-8 terms possible. Anything never ticked is a prime implicant.
Step 3 — Prime Implicant Chart
Rows = PIs, columns = original minterms. Mark ✗ where a PI covers a minterm.

Find EPIs: scan each column. If a minterm is covered by exactly one PI, that PI is essential.
- covered only by → EPI ()
- covered only by → EPI ()
- covered only by → EPI
Chosen EPIs so far: . Check coverage: they cover = all minterms. Done.
3. Worked example 2 (smaller, 3 vars)
Minimize .
Group by 1s: {0=000} | {1=001, 2=010} | {5=101, 6=110} | {7=111}
Combine (size-2):
- 0,1→00- ; 0,2→0-0 ; 1,5→-01 ; 2,6→-10 ; 5,7→1-1 ; 6,7→11-
Why this step? Every pair here has Hamming distance 1, so one variable cancels — direct use of .
Combine (size-4): none share a dash position + differ by one bit → all size-2 terms are prime.
Decode the PIs (order ):
00-0-0-01-101-111-
PI chart / EPI hunt:
- ∈ {
00-,0-0} → not unique yet. - ∈ {
1-1,11-}; ∈ {-01,1-1}; ∈ {-10,11-}.
Pick a minimal cover — we need all of . Take: Why: →{0,1}, →{5,7}, →{2,6}; union = all six. ✔ (Only 3 terms, 6 literals — minimal.)
4. Common mistakes
5. Active recall
Recall Feynman: explain to a 12-year-old
Imagine sorting cards with 0s and 1s on them. You line them up by how many 1s each card has. Then you look for two cards that are almost twins — same except one spot. You glue them into a card with a blank - in that spot, meaning "this spot doesn't matter." You keep gluing bigger and bigger stacks. When nothing else glues, the leftover stacks are your "biggest patterns." Finally you check which patterns you absolutely can't skip (because only they cover a certain card) — those go into your shortest recipe for the machine.
Flashcards
What single Boolean law powers all of Quine–McCluskey?
Why group minterms by number of 1s?
What does a - in a QM term mean?
Define a prime implicant.
Define an essential prime implicant.
Two terms can combine into a larger group only if...
How are don't-cares used in QM?
What is the purpose of the PI chart?
Can two minterms differing in 2 bits combine?
Decode the pattern 01-1 in ABCD order.
Connections
- Karnaugh Maps — visual sibling; QM is the tabular generalization for many variables.
- Sum of Products (SOP) — QM outputs a minimal SOP.
- Boolean Algebra Laws — the combining/complement laws .
- Prime Implicants and Petrick's Method — Petrick handles non-essential PI selection algebraically.
- Logic Gate Minimization — fewer literals ⇒ fewer gates ⇒ cheaper hardware.
Concept Map
Hinglish (regional understanding)
Intuition Hinglish mein samjho
Dekho, Quine–McCluskey basically K-map ka table wala bada bhai hai. K-map 5 variable ke upar visually manage nahi hota, isliye QM ek mechanical, step-by-step method deta hai jise computer bhi kar sakta hai. Poore method ka dil sirf ek law hai: . Matlab agar do minterms sirf ek bit me difference rakhte hain, to woh ek variable cancel ho jata hai (kyunki ), aur us jagah hum ek dash - laga dete hain.
Process simple hai: pehle minterms ko unke number of 1s ke hisaab se groups me daalo. Fir adjacent groups ke terms compare karo — jinme sirf ek bit alag hai unko combine karke tick maar do. Yeh combine karte raho, size 2 → size 4 → size 8, jab tak aur kuch combine na ho. Jo terms kabhi tick nahi hue, woh prime implicants hain — yani jo aur simplify nahi ho sakte. Ek important cheez: pattern decode karte waqt position order fix hota hai (ABCD), aur dash wala variable gayab ho jata hai — jaise 01-1 ka matlab hai, na ki .
Ab prime implicant chart banao: rows me PIs, columns me original minterms. Jis minterm ko sirf ek hi PI cover kar raha hai, woh PI essential hai — usko answer me lena hi padega. Essential PIs le lo, phir dekho koi minterm bacha to nahi; agar bacha to remaining ko cover karne ke liye minimum PIs aur choose karo.
Do galtiyan sabse common hain: (1) 2 bit difference wale terms ko galti se combine kar dena — bilkul mat karo, sirf exactly ek bit difference. (2) saare PIs ko answer me daal dena — nahi, sirf essential wale guaranteed hain, baaki chart se minimal choose karo. Don't-care terms ko combine karte waqt use karo, par chart me unke liye column mat banao. Bas itna yaad rakho aur QM easy ho jayega!