SOP, POS, minterms and maxterms
The standard ways to write a Boolean function: minterms and maxterms with their numbering, canonical sum of minterms and product of maxterms, converting between them, complements, don't cares and counting.
Why it exists
A truth table says what a function is; a circuit needs an expression. There are many expressions for one function, so engineers fix two standard shapes: sum of products (an OR of AND terms, a two-level AND-OR circuit) and product of sums (an AND of OR terms, a two-level OR-AND circuit). Every function has a unique canonical form in each shape, built directly from its truth table, and every minimisation method (K-map, tabular) starts from it. GATE questions in this area ask you to list the minterms, convert between the two canonical forms, count minterms, or identify the complement.
Prerequisites
You need the laws from Boolean algebra, especially and De Morgan.
Precise definitions
Literal. A variable or its complement ( or ).
Product term (AND term). A literal or an AND of literals. Sum term (OR term). A literal or an OR of literals.
Sum of products (SOP). An OR of product terms, for example . Product of sums (POS). An AND of sum terms, for example . A form with at most two levels of gates (not counting inverters) is a standard form.
Minterm. For variables, a product term that contains every variable exactly once, so that it is 1 on exactly one row of the truth table. The row with binary index (the first variable is the most significant bit) has the minterm : a variable appears uncomplemented where the bit of is 1 and complemented where it is 0. For three variables :
| minterm | maxterm | ||
|---|---|---|---|
| 0 | 000 | ||
| 1 | 001 | ||
| 2 | 010 | ||
| 3 | 011 | ||
| 4 | 100 | ||
| 5 | 101 | ||
| 6 | 110 | ||
| 7 | 111 |
Maxterm. A sum term that contains every variable exactly once, so that it is 0 on exactly one row. The maxterm has a variable uncomplemented where the bit of is 0 and complemented where it is 1 (the opposite of the minterm). The two are complements: and .
Useful facts about minterms. Two different minterms multiply to 0 ( for ). All minterms add up to 1. A minterm with variables has literals.
Canonical sum of products (sum of minterms). The function equals the OR of the minterms of the rows where it is 1:
Canonical product of sums (product of maxterms). The function equals the AND of the maxterms of the rows where it is 0:
Conversion. If over variables, then where is the set of all indices not in . Also and . The two canonical forms of one function list complementary sets of indices. A function with ones has minterms in its canonical SOP and maxterms in its canonical POS.
Obtaining a canonical SOP from any SOP. Multiply each product term that lacks a variable by and expand; remove duplicates. For a canonical POS from a POS, add to each sum term lacking and use the distributive law .
Don't cares. An input combination that cannot occur, or whose output is not needed, is a don't care, written or X. A function is then given as . The designer may treat each don't care as 0 or 1, whichever gives a simpler circuit (see Karnaugh maps).
Minimal forms. A minimal SOP has the fewest product terms and, among those, the fewest literals. The canonical SOP is rarely minimal. The -input parity (XOR) function is the extreme case: no two minterms are adjacent, so its minimal SOP is its canonical SOP, with terms of literals.
Counting. There are minterms for variables, so functions (each subset of minterms is a different function). A product term that omits of the variables is a sum of minterms.
How it works
Step through the table for . The columns show the function, its sum of minterms , and its product of maxterms . Rows where are exactly the minterms; rows where are exactly the maxterms. The two canonical forms agree on every row.
F = AB' + C as a sum of minterms and as a product of maxterms
Computed exactly, not typed| A | B | C | F=AB'+C | m1+m3+m4+m5+m7 | M0.M2.M6 |
|---|---|---|---|---|---|
| 0 | 0 | 0 | · | · | · |
| 0 | 0 | 1 | · | · | · |
| 0 | 1 | 0 | · | · | · |
| 0 | 1 | 1 | · | · | · |
| 1 | 0 | 0 | · | · | · |
| 1 | 0 | 1 | · | · | · |
| 1 | 1 | 0 | · | · | · |
| 1 | 1 | 1 | · | · | · |
Step 0
Claim: the function is 1 exactly on rows 1, 3, 4, 5, 7. The sum of those minterms and the product of the maxterms for the other rows 0, 2, 6 are the same function.
Method: write the truth table, then read it off. For SOP, take each row with output 1, write the product of all variables (true form for a 1, complemented for a 0) and OR them. For POS, take each row with output 0, write the sum of all variables (true form for a 0, complemented for a 1) and AND them. The reversal of the rule between minterm and maxterm is the usual place to slip; check one row (substitute the row's values: a minterm must give 1, a maxterm must give 0).
Worked examples
EX 1Write $m_5$ and $M_5$ for three variables
EasyStep 1. , so , , .
Step 2 (minterm). Uncomplemented where the bit is 1, complemented where it is 0: . Check: with the product is .
Step 3 (maxterm). Uncomplemented where the bit is 0, complemented where it is 1: . Check: at the same row.
EX 2Minterms and maxterms of a function
EasyFor the program lists the rows where is 1 and where it is 0, for this function and for .
#include <stdio.h>
static int f1(int a, int b, int c) { return (a && !b) || c; }
static int f2(int a, int b, int c) { return (!a && b) || (a && c); }
static void lists(const char *name, int (*f)(int, int, int)) {
printf("%s: minterms", name);
for (int i = 0; i < 8; i++)
if (f((i >> 2) & 1, (i >> 1) & 1, i & 1)) printf(" %d", i);
printf(" | maxterms");
for (int i = 0; i < 8; i++)
if (!f((i >> 2) & 1, (i >> 1) & 1, i & 1)) printf(" %d", i);
printf("\n");
}
int main(void) {
lists("AB'+C", f1);
lists("A'B+AC", f2);
int count = 0;
for (int i = 0; i < 16; i++) {
int a = (i >> 3) & 1, b = (i >> 2) & 1;
if (a || !b) count++;
}
printf("A+B' over four variables has %d minterms\n", count);
return 0;
}AB'+C: minterms 1 3 4 5 7 | maxterms 0 2 6
A'B+AC: minterms 2 3 5 7 | maxterms 0 1 4 6
A+B' over four variables has 12 mintermsSo and .
EX 3Expand an SOP to canonical form
MediumWrite as a sum of minterms.
Step 1. lacks : . lacks : .
Step 2. Sum: . In index form: , , , .
Result. , and so , which matches the program output above.
EX 4From minterms to maxterms and the complement
MediumLet .
Step 1 (maxterms). The other indices are 1, 3, 4, 6, 7, so .
Step 2 (complement). and also .
Step 3 (write one of them out). , , , , , and is their product.
EX 5Counting minterms of a product or sum term
GATE levelHow many minterms does have over four variables ?
Step 1. is 1 on 8 of the 16 rows. is 1 on 8 rows. They are both 1 when and , which is 4 rows.
Step 2. By inclusion and exclusion, (the program prints 12).
Step 3 (check by the complement). is 1 on rows, so has .
General rule. A product term with literals over variables covers minterms.
EX 6A function with no simplification
GATE levelHow many product terms does the minimal SOP of the three-variable parity function have?
Step 1. The function is 1 when an odd number of inputs are 1, so .
Step 2. Any two of these indices differ in at least two bits ( and differ in two, and in two, and so on), so no two minterms can merge into a smaller product term.
Result. The minimal SOP is the canonical SOP: 4 terms of 3 literals each, . For inputs the count is terms.
Cheat box
Cheat box
- Minterm : AND of all variables, true where the bit is 1. Maxterm : OR of all variables, true where the bit is 0. .
- First variable is the most significant bit of the index.
- .
- .
- has minterms maxterms. A term with literals covers minterms.
- for ; .
- Don't cares: , free to be 0 or 1.
- -input parity: minimal SOP has terms of literals; there is no simplification.
- Number of functions of variables: .
Traps and GATE patterns
Connections
Builds on
Across subjects
No cross-subject links yet.
Both canonical forms are what a Karnaugh map and the tabular method start from. A decoder generates all minterms of its inputs, so any function is an OR of decoder outputs. A multiplexer with select lines implements a sum of minterms by Shannon expansion, and the design of combinational circuits begins with exactly this truth-table-to-expression step.
PYQs
3 previous year questions from your book. I re-solved each one myself (3 by running or simulating, 0 by reasoning only); the book's key is shown next to my answer. All PYQs
The number of min-terms after minimizing the following Boolean expression is ________. [D' + AB' + A'C + AC'D + A'C'D]'.
The truth table represents the Boolean function
- (a)X
- (b)X + Y
- (c)X ⊕Y
- (d)Y
Given f1,f2 and f in the canonical sum of products form(in decimal) for the circuit f1 = Σm(4, 5, 6, 7, 8) f3 = Σm(1, 6, 15) f = Σm(1, 6, 8, 15) then f2 is
- (a)Σm(4, 6)
- (b)Σm(4, 8)
- (c)Σm(6, 8)
- (d)Σm(4, 6, 8)
Self-check
Question 1
Write as over .
Show answerHide
and . So .
Question 2
A 4-variable function has 6 minterms. How many maxterms does its canonical POS have?
Show answerHide
.
Question 3
What is the maxterm over ?
Show answerHide
, so . The maxterm is complemented where the bit is 1: .
Question 4
How many minterms does the product term cover over four variables?
Show answerHide
It has 2 literals, so it covers minterms.
Revision card
One-screen revision
- : true literal where the bit is 1. : true literal where the bit is 0. .
- ; complement swaps the index sets.
- ones minterms and maxterms.
- Expand a missing variable with . A term with literals covers minterms.
- Don't cares are free. Parity has no simplification.
References
- ·Mano and Ciletti, Digital Design, 5th ed., Chapter 2 Boolean Algebra and Logic Gates (canonical and standard forms)
- ·Kohavi and Jha, Switching and Finite Automata Theory, Chapter 3 Boolean algebra (canonical forms)
Verification
The minterm and maxterm numbering, the equality of the sum-of-minterms and product-of-maxterms forms for all 256 functions of three variables, the complement and conversion rules, the minterm counts and the parity minimal-SOP claim (n = 2 to 5, by exhaustive cover search) are checked in scripts/enum-checks/dl_forms.py. The truth-table animation is computed by scripts/gen-dl-traces.py. The C program is compiled and run by npm run verify:c. Textbook chapter titles are from memory; the independent second pass has not been run, so the page stays draft. 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)