Tabular method (Quine-McCluskey)
Minimising a Boolean function without a map: list the minterms in binary, group them by the number of ones, combine neighbouring groups that differ in one bit until nothing combines, read off the prime implicants, build the prime implicant chart, take the essential primes, delete dominated rows and columns, and settle what is left with Petrick's method; don't cares, products of sums, ties between minimum covers, and what the method costs.
Why it exists
A Karnaugh map is a picture: a person looks for the largest groups of ones. It is quick for three or four variables, awkward for five, and unusable beyond. The tabular method (Quine-McCluskey) finds the same groups by pure bookkeeping on binary numbers, so it works for any number of variables and is the form in which a program does two-level minimisation. The official syllabus names it next to the Karnaugh map, and the exam asks for its by-products: how many prime implicants, which are essential, which minterms combine in the first round.
Prerequisites
You need minterms, the sum of products form and the idea of an implicant from Boolean functions and their forms, and the groups, prime implicants and essential prime implicants of the Karnaugh map.
Precise definitions
Cube. A product term written as a string over 0, 1 and -, one position per variable (leftmost = most significant variable). 1 means the variable appears uncomplemented, 0 complemented, - absent. For : 10-0 is . A cube with dashes covers minterms.
Implicant. A cube all of whose minterms are in the ON-set or are don't cares. Prime implicant. An implicant that is not contained in a larger implicant (removing any literal would make it cover an OFF minterm). Essential prime implicant. A prime implicant that is the only one covering some ON minterm; it is in every cover.
Group. The number of ones in a cube. Adjacent cubes differ in exactly one position, and in that position neither has a dash; the dashes of the two cubes must be in the same places. Their combination has a dash in the differing position.
Cost of a cover. The number of product terms first, then the number of literals. A minimum cover is a cover of the ON-set by prime implicants of least cost.
The procedure.
- List the minterms and the don't cares in binary and sort them by group.
- Round 1: compare every cube of group with every cube of group . For each adjacent pair write the combined cube (once) in the next table and tick both cubes. Round 2, 3, ... repeat with the combined cubes, until a round produces nothing.
- Every cube that was never ticked is a prime implicant (in whichever round it stands).
- Build the prime implicant chart: rows are the prime implicants, columns the ON-set minterms only.
- Choose the essential prime implicants (a column with one X), delete the columns they cover. Delete dominated rows and columns. Repeat.
- If columns are left and several choices remain, use Petrick's method: for every column write the sum of the rows that cover it, multiply the sums out with and , and take the cheapest product.
How it works
Step 1 and 2: the combining rounds
Quine-McCluskey: combining rounds: start
Computed by a script, not typed| size: cube | Group (ones) | Cube ABCD | Covers | Merges with (gives) | Result |
|---|---|---|---|---|---|
| 1 minterm: 0000 | |||||
| 1 minterm: 0001 | |||||
| 1 minterm: 0010 | |||||
| 1 minterm: 1000 | |||||
| 1 minterm: 0101 | |||||
| 1 minterm: 0110 | |||||
| 1 minterm: 1001 | |||||
| 1 minterm: 1010 | |||||
| 1 minterm: 0111 | |||||
| 1 minterm: 1110 | |||||
| 2 minterms: -000 | |||||
| 2 minterms: 00-0 | |||||
| 2 minterms: 000- | |||||
| 2 minterms: -001 | |||||
| 2 minterms: -010 | |||||
| 2 minterms: 0-01 | |||||
| 2 minterms: 0-10 | |||||
| 2 minterms: 10-0 | |||||
| 2 minterms: 100- | |||||
| 2 minterms: -110 | |||||
| 2 minterms: 01-1 | |||||
| 2 minterms: 011- | |||||
| 2 minterms: 1-10 | |||||
| 4 minterms: -0-0 | |||||
| 4 minterms: -00- | |||||
| 4 minterms: --10 |
Step 0
F(A,B,C,D) = sum m(0,1,2,5,6,7,8,9,10,14), no don't cares. Write every minterm in binary and sort by the number of ones (the group). Only cubes of NEIGHBOURING groups can combine, and only if they differ in exactly one position (a dash must meet a dash). A cube that combines is ticked; a cube that never combines is a prime implicant. Each size is a round; the next round repeats the procedure on the merged cubes.
The function is . The first ten rows are the minterms by group. Look at 0000 in group 0: it differs in exactly one bit from 0001, 0010 and 1000, so it produces 000-, 00-0 and -000 and is ticked. Round 2 combines the cubes of size 2: only cubes with the dash in the same place can merge, -000 with -001 gives -00-. The same cube can arise from two different pairs (-0-0 comes from -000 with -010 and from 00-0 with 10-0); it is written once. Round 2 produces three cubes of size 4, and round 3 finds no neighbours among them, so the process stops. The cubes without a tick are the prime implicants: (0-01), (01-1), (011-), (-0-0), (-00-), (--10).
Step 3 and 4: the chart
Quine-McCluskey: prime implicant chart: start
Computed by a script, not typed| prime implicant | m0 | m1 | m2 | m5 | m6 | m7 | m8 | m9 | m10 | m14 | Literals |
|---|---|---|---|---|---|---|---|---|---|---|---|
| P1: CD' (--10) | |||||||||||
| P2: B'D' (-0-0) | |||||||||||
| P3: B'C' (-00-) | |||||||||||
| P4: A'C'D (0-01) | |||||||||||
| P5: A'BD (01-1) | |||||||||||
| P6: A'BC (011-) |
Step 0
Rows are the prime implicants, columns are the minterms of the ON-set (a don't care would never get a column). An X says that the prime implicant covers the minterm. The chart is built one row at a time here.
Each row marks the minterms the prime implicant covers. A column with a single X names an essential prime implicant: is covered only by , only by . Columns are only the ON-set: a don't care is allowed to be covered but never has to be.
Step 5: essential primes and dominance
Quine-McCluskey: essential primes and dominance: start
Computed by a script, not typed| step | Action | Prime implicant / column | Reason | Columns left | Chosen so far |
|---|---|---|---|---|---|
| step 1 | |||||
| step 2 | |||||
| step 3 | |||||
| step 4 |
Step 0
Repeat until nothing changes: (1) a column with a single X makes its row essential; choose the row, delete the columns it covers; (2) delete a row that another row dominates; (3) delete a column that another column dominates.
and are chosen, which removes and . Left are and . Row covers only , row covers both, at the same literal cost, so is dominated and deleted. Now has a single X: is chosen, and the chart is empty. The answer is (3 terms, 7 literals). The prime implicant is never needed: all its minterms are covered by the others. A prime implicant can be essential, optional or useless.
Row dominance: row dominates row if covers every remaining column that covers, and costs no more. Delete . Column dominance: column is dominated by column if every row that covers also covers . Delete (covering covers for free).
When no prime implicant is essential
A chart without essential prime implicants: start
Computed by a script, not typed| prime implicant | m0 | m1 | m2 | m5 | m6 | m7 |
|---|---|---|---|---|---|---|
| P1: B'C (-01) | ||||||
| P2: BC' (-10) | ||||||
| P3: A'C' (0-0) | ||||||
| P4: A'B' (00-) | ||||||
| P5: AC (1-1) | ||||||
| P6: AB (11-) |
Step 0
F(A,B,C) = sum m(0,1,2,5,6,7). Six prime implicants, each covering two minterms, each minterm covered by two primes.
has six prime implicants and every column has two X's. Nothing is essential, nothing dominates anything. Guessing a row does work (and many students do it), but nothing in the chart says which choices are cheapest, so we need a method that looks at all of them.
Petrick's method
Petrick's method: start
Computed by a script, not typed| after | Factor | Products so far (after absorption) | Number of products |
|---|---|---|---|
| column m0 | |||
| column m1 | |||
| column m2 | |||
| column m5 | |||
| column m6 | |||
| column m7 |
Step 0
One factor per column: the sum of the prime implicants that cover it. A cover is a product that picks at least one prime from every factor. Multiply the factors one by one; remove every product that contains another product.
For each column write "one of the rows covering it must be chosen": for , for , and so on. A cover is a choice that satisfies all the factors, which is the product of the sums. Multiply them out step by step; after each multiplication delete every product that contains another product (), because it is a more expensive cover of the same thing. What is left are the irredundant covers. The cheapest are and : and , both 3 terms and 6 literals. The minimum cover is not unique; both are correct answers, and the exam may offer both among the options.
Don't cares
Don't cares in the tabular method: start
Computed by a script, not typed| treatment | Prime implicants | Essential primes | Minimum cover | Cost |
|---|---|---|---|---|
| Don't cares as 0 | ||||
| Don't cares as don't cares | ||||
| Don't cares as 1 |
Step 0
F(A,B,C,D) = sum m(0,1,2,3,4,8) with don't cares d(5,12). The same function handled three ways. Only the middle row is the tabular method.
Don't cares take part in the combining step (they let the cubes grow, so the terms get shorter) but they have no column in the chart (nobody has to cover them). Throwing them away gives a more expensive answer (more literals); making them columns is also wrong (a cover would have to cover things it need not). The second row is the method.
Product of sums
To get a minimum product of sums, run the same procedure on the OFF-set (the maxterms) to get a minimum sum of products for , then complement it with De Morgan: every product term becomes a sum term with the literals complemented. For above, the OFF-set is ; the method gives (3 terms, 9 literals), so .
What the method costs
The number of cubes in the tables and of products in Petrick's method can grow very fast with the number of variables. The largest number of prime implicants over all functions is 2, 6 and 13 for 2, 3 and 4 variables:
How often is the chart cyclic?: start
Computed by a script, not typed| variables | Functions | Most prime implicants | No column with a single X | Choice left after reduction (Petrick) |
|---|---|---|---|---|
| 2 variables | ||||
| 3 variables | ||||
| 4 variables |
Step 0
Every function of 2, 3 and 4 variables (no don't cares) was run through the method. A chart without any essential prime implicant is rare (584 of 65536 for four variables), but a choice that is left after the essentials and the dominance steps is common.
Charts without any essential prime implicant are rare (584 of the 65536 four-variable functions), but a choice left after the essential primes and the dominance steps is common (21656), so Petrick's method or a tie-break is a normal part of the work. The covering step is the hard part; the combining step only enumerates.
Worked examples
EX 1One round by hand
Easy. Group 1: 001; group 2: 011, 101; group 3: 111. Round 1: 001+011 gives 0-1; 001+101 gives -01; 011+111 gives -11; 101+111 gives 1-1. Round 2: 0-1+1-1 gives --1, and -01+-11 gives --1 as well (written once). Only --1 is never ticked: the single prime implicant is , so .
EX 2With don't cares: F = sum m(4,8,10,11,12,15) + d(9,14)
MediumList 4, 8, 9, 10, 11, 12, 14, 15 (the don't cares included): group 1: 0100, 1000; group 2: 1001, 1010, 1100; group 3: 1011, 1110; group 4: 1111. Round 1 gives -100, 100-, 10-0, 1-00, 10-1, 101-, 1-10, 11-0, 1-11, 111-. Round 2: 10-- (from 100- and 101-, also from 10-0 and 10-1), 1--0 (from 10-0 and 11-0, also from 1-00 and 1-10), 1-1- (from 101- and 111-, also from 1-10 and 1-11). The cube -100 found no partner. Prime implicants: , , , .
Chart columns: (not 9 or 14). is covered only by (covers 4, 12), only by (covers 10, 11, 14, 15). After them only is left, and both and cover it with two literals each. So there are two minimum covers: and (3 terms, 7 literals each). Both are correct.
EX 3Counting questions
MediumFor (the first table): the first column has 10 cubes, the second 13, the third 3; the function has 6 prime implicants, 2 of them essential at the start ( and ), and the third prime becomes necessary after the dominance step. The minimum sum of products has 3 terms and 7 literals. In the tabular method "the number of terms in the second column" depends on the function and on how duplicates are counted: a cube that arises from two pairs is written once.
EX 4Typical questions
GATE level(a) "Which of these cubes can be formed in round 1 from the minterms ...?" Check "exactly one bit differs": 0101 and 0111 give 01-1, but 0101 and 0110 differ in two bits and do not combine. (b) "How many prime implicants has F?" Count the cubes that were never ticked, from every round. (c) "Which prime implicants are essential?" A column with a single X. (d) "The minimum expression is not unique": after the essential primes, check whether two remaining rows can cover the rest at the same cost. (e) "Cost of the cover": terms first, then literals; read the question for the cost it uses (gates, literals, inputs). (f) "Which method gives a minimum product of sums?" The same method on the zeros, complemented.
Cheat box
Cheat box
- Cube = string over 0, 1, -. Group = number of ones. Combine neighbouring groups that differ in exactly one position, dashes in the same places.
- Tick the cubes that were used; the cubes never ticked (in any round) are the prime implicants.
- Include the don't cares when combining; leave them out of the chart columns.
- Chart: rows = prime implicants, columns = ON minterms. A column with one X gives an essential prime.
- Reduce: essential primes, row dominance (covers at least as much, no more literals), column dominance. Then Petrick: product of sums, absorb , take the cheapest product.
- Minimum cover: fewest terms, then fewest literals; it need not be unique.
- Product of sums: run the method on the OFF-set and complement.
Traps and GATE patterns
Connections
Across subjects
No cross-subject links yet.
The Karnaugh map and the tabular method find the same prime implicants: a group on the map is a cube of the table. The result feeds the design of combinational circuits, where the cost of the cover is the number of gates and gate inputs.
PYQs
1 previous year question from your book. I re-solved each one myself (1 by running or simulating, 0 by reasoning only); the book's key is shown next to my answer. All PYQs
Consider a Boolean function F with the following min-term expression: F(P, Q, R, S) = Σm(1, 2, 3, 4, 5, 7, 10, 12, 13, 14) Which of the following options is/are the minimal sum-of-products expression(s) of F?
- (a)P ̅S+ QR ̅ + P ̅Q ̅R+ Q ̅RS ̅
- (b)P ̅S+ QR ̅ + P ̅QR ̅ + PRS ̅
- (c)P ̅S+ QR ̅ + PQS ̅ + PRS ̅
- (d)P ̅S+ QR ̅ + PQS ̅ + Q ̅RS ̅
Self-check
Question 1
Which of the pairs 0110/0111, 0110/1001, -110/1110, -110/0-10 can be combined, and what is the result?
Show answerHide
0110/0111 gives 011-. 0110/1001 differ in four positions, no. -110/1110 gives --10. -110/0-10 have their dashes in different places, no.
Question 2
A chart has columns and rows (covers ), (covers ), (covers ). Is there an essential prime? What does Petrick's method give?
Show answerHide
No: every column has two X's. The factors are . Multiplying the first two gives ; times gives : any two rows are a cover, so there are three minimum covers of equal term count (the cost then depends on their literals).
Question 3
Why do the don't cares not get a column in the chart?
Show answerHide
A cover must contain every ON minterm and no OFF minterm; a don't care may be inside the cover or not. A column would force the cover to include it. The don't cares are only used earlier, to let the cubes grow.
Revision card
One-screen revision
- Binary minterms (with don't cares), group by number of ones, combine neighbouring groups that differ in one bit, tick used cubes; unticked cubes = prime implicants.
- Chart: ON-set columns only. One X in a column = essential. Then dominance, then Petrick.
- Petrick: product of sums over the columns, absorb, cheapest product. Minimum cover not always unique.
- POS: run on the zeros and complement.
References
- ·Mano and Ciletti, Digital Design, 5th ed., Chapter 3 Gate-Level Minimization (the tabular method is treated in the older editions and in the exercises; check the edition)
- ·Kohavi and Jha, Switching and Finite Automata Theory, Chapter 4 Minimization of switching functions (prime implicants, the covering problem, Petrick's method)
Verification
scripts/enum-checks/dl_qm_check.py compares the method (scripts/qm_lib.py) with the DEFINITIONS on 78403 functions: every function of 4 variables, every function of 2 and 3 variables with don't cares, random functions of 4 and 5 variables with don't cares. (1) The cubes found in round k of the combining step are exactly the implicants of the function with k dashes (205461 cubes); (2) the cubes that never combine are exactly the prime implicants from the definition (an implicant not contained in a larger implicant); (3) every cover returned is correct on the ON-set and the OFF-set and has the cost of the exhaustive minimum (fewest terms, then fewest literals) found by trying all subsets; the covers returned are minimum covers, and where no dominance step was used they are ALL the minimum covers; (4) every essential prime implicant (the only prime covering some minterm) is chosen; (5) an independent bit-mask version of the reduction agrees on whether a choice is left, for every function of 2, 3 and 4 variables, and the counts printed on the page are equal; (6) the numbers of the page examples. tests/dl-qm-traces.test.ts re-derives the implicants, the chart, the minimum covers of the examples and the counts in TypeScript. CONVENTIONS: a minimum cover has the fewest product terms and then the fewest literals; a row is deleted as dominated only if another row covers at least as much of what is left and is strictly better (more coverage or fewer literals), so two rows that are equal stay and Petrick's method finds both covers; the order of the rules is essential primes, rows, columns. Chapter references are from memory and need verification. SECOND PASS (2026-11-02, done by the assistant, not a human check): every Self-check question was solved before the printed answer was read and all agreed; the definitions, worked examples, cheat box and traps were read claim by claim and the numbers re-derived by hand or by a small script (conversions, signed ranges and flags, IEEE 754 fields and custom formats, Boolean identities and counts, K-map groups, adder carries, BCD correction, flip-flop conversions, counter sequences and T equations, state reduction, Quine-McCluskey rounds and covers, floating-point alignment and rounding); long C programs were not re-read line by line (they are compiled and compared by npm run verify:c, and their printed outputs were checked against the prose); tables and animations are machine output and were read, not re-run; No other defect found. Status raised to self-checked; verified needs a textbook or human check.
last verified: never
My notes (saved in this browser)