Sum-of-Products & Product-of-Sums
Digital Logic 101 · 10 min read
From a truth table to canonical SOP
| # | A | B | C | F | minterm |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | A'B'C' |
| 1 | 0 | 0 | 1 | 0 | — |
| 2 | 0 | 1 | 0 | 0 | — |
| 3 | 0 | 1 | 1 | 1 | A'BC |
| 4 | 1 | 0 | 0 | 0 | — |
| 5 | 1 | 0 | 1 | 1 | AB'C |
| 6 | 1 | 1 | 0 | 0 | — |
| 7 | 1 | 1 | 1 | 1 | ABC |
| F = A′B′C′ + A′BC + AB′C + ABC | |||||
A minterm for n variables is an AND of every variable, each either bare or primed. With n variables there are exactly minterms — one per row of the truth table.
The minterm for row evaluates to 1 only on row i. Take the OR of every minterm whose row has and you get a sum-of-products that matches the truth table exactly. That’s the canonical SOP.
From a truth table to canonical POS
| # | A | B | C | F | maxterm |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | — |
| 1 | 0 | 0 | 1 | 0 | A+B+C' |
| 2 | 0 | 1 | 0 | 0 | A+B'+C |
| 3 | 0 | 1 | 1 | 1 | — |
| 4 | 1 | 0 | 0 | 0 | A'+B+C |
| 5 | 1 | 0 | 1 | 1 | — |
| 6 | 1 | 1 | 0 | 0 | A'+B'+C |
| 7 | 1 | 1 | 1 | 1 | — |
| F = (A+B+C′)(A+B′+C)(A′+B+C)(A′+B′+C) | |||||
A maxterm is the dual of a minterm: an OR of every variable (bare or primed) that is 0 only on its row. The literal sense flips: for the row where bit is 1, the variable is primed; for bit 0, the variable is bare.
AND all maxterms whose rows have and you get the canonical POS — the product-of-sums that matches the truth table exactly.
Σm and ΠM compact notation
F = Σm(0, 3, 5, 7)
F = ΠM(1, 2, 4, 6)
\{0,3,5,7\} ∪ \{1,2,4,6\} = \{0..7\}, disjoint.
accent = minterm row (F=1); plain = maxterm row (F=0).
Writing every literal gets verbose. Engineers compress it: means “the OR of minterms 0, 3, 5, and 7”. The dual form means “the AND of maxterms 1, 2, 4, and 6”.
For a single function the two index sets are complements — the minterm indices are exactly the rows missing from the maxterm indices.
Non-canonical SOP and POS
Canonical forms are exhaustive but not minimal. Once you have a canonical SOP, simplification (Boolean algebra, K-maps, Quine-McCluskey) reduces it to a non-canonical SOP whose product terms have fewer literals. The function is the same; the gate count drops.
Don’t-cares
| # | A | B | F |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 1 | 0 | 1 | X |
| 2 | 1 | 0 | 0 |
| 3 | 1 | 1 | 1 |
F = Σm(0, 3) + d(1)
F = ΠM(2) · D(1)
Row 1 is unobserved → minimiser may treat its F-value as 0 or 1 depending on which yields a smaller cover.
A don’t-care row is one whose input combination can’t occur (BCD codes 10-15, for example) or whose output doesn’t matter to the larger system. Mark it “X” on the truth table. The minimiser is then free to absorb it as 0 or 1, whichever shrinks the result.
Notation: for SOP, for POS. Don’t-cares are not required in the minimum form — they’re available for use.