Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 2: Quine–McCluskey (Q-M) Method of Function Realization

Lesson 11 of 20 in the free Digital Electronics-II notes on Siksha Sarovar, written by Rohit Jangra.

10.1 Why K-maps run out of steam

A 3- or 4-variable K-map is easy to draw and minimise by inspection. But once you have 5 or more variables, the K-map either becomes 3-D (5 variables) or several stacked maps (6+ variables), and visual grouping becomes error-prone. The Quine–McCluskey method gives a purely tabular procedure that handles any number of variables and is straightforward to mechanise (or program).

10.2 Q-M algorithm at a glance

10.3 Phase 1 — generating prime implicants

Step 1: List minterms

Write each minterm of the function (and the don't-cares) in binary, with one row per minterm. Group them by the number of 1s they contain — Group 0 has zero 1s, Group 1 has one 1, etc.

Step 2: Combine adjacent groups

Two minterms can be combined when they differ in exactly one bit. Replace that bit with a dash ("−"). The dash is permanent — it tells you that variable is not needed.

Step 3: Keep combining until no new combinations are possible

A term in the new column can combine with another term in the same column only if they have a dash in the same position and differ in exactly one of the remaining bits.

Step 4: Prime implicants

Any term that is never combined further is a prime implicant. Mark every such "untouched" entry with ✱.

10.4 Worked example — F(A,B,C,D) = Σm(0, 1, 2, 5, 6, 7, 8, 9, 10, 14)

Initial table, grouped by 1-count

GroupMintermBinary
000000
110001
120010
181000
250101
260110
291001
2101010
370111
3141110

First combination

Combined pairResultFrom
0–1000−0,1
0–200−00,2
0–8−0000,8
1–50−011,5
1–9−0011,9
2–60−102,6
2–10−0102,10
8–9100−8,9
8–1010−08,10
5–701−15,7
6–7011−6,7
6–14−1106,14
10–141−1010,14

Second combination

Combined pairResultFrom
(0,2) – (8,10)−0−00,2,8,10
(2,6) – (10,14)−−102,6,10,14

No further combinations are possible. The prime implicants are:

  • 000− (covers 0,1)
  • 0−01 (covers 1,5)
  • −001 (covers 1,9)
  • 100− (covers 8,9)
  • 01−1 (covers 5,7)
  • 011− (covers 6,7)
  • −0−0 (covers 0,2,8,10)
  • −−10 (covers 2,6,10,14)

10.5 Phase 2 — the prime implicant chart

Lay out a table with minterms on top and prime implicants down the side. Tick each cell where the PI covers that minterm.

PI012567891014
000−××
0−01××
−001××
100−××
01−1××
011−××
−0−0××××
−−10××××

Essential prime implicants

A column with exactly one tick means only one PI covers that minterm, so it must be in the final solution.

  • Minterm 14 → only −−10 → essential.
  • With −−10 chosen, minterm 6 is covered.
  • Remaining columns: scan again, pick PIs that cover the rest with fewest gates.

10.6 Final minimised expression

For this example, one optimal cover is:

    F = (−0−0) + (−−10) + (000−) + (01−1) + (−001)
      = B'D' + CD' + A'B'C' + A'BD + B'C'D

(There can be several equally optimal covers — Q-M finds one of them.)

10.7 Strengths and limits

Q-MK-map
Number of variablesAny≤ 5 in practice
MechanisableYes — easy to programNo
Speed for large NSlow (NP-hard in worst case)Impossible
Always finds minimum cover?YesOnly if you spot the right groupings

Q-M is the theoretical minimum-cost algorithm. For real circuits with 20+ variables, CAD tools use heuristic minimisers like Espresso, which trade exactness for speed but still build on the same generate-and-cover idea.