How to Get a Simplified Sum of Products from a Truth Table
At a glance
- 1. List the 1-rows
Note every truth-table row where the output F equals 1.
- 2. Write the minterms
AND every variable, complementing those that are 0 in that row.
- 3. OR them together
This canonical sum of minterms is correct but not minimal.
- 4. Group and simplify
Merge terms differing in one variable (XY + XY′ = X) with a K-map.
Try it: Boolean simplifier calculator
A truth table gives you the function completely. Turning it into a sum of products (SOP) expression takes two steps: write the canonical form, then simplify.
Step 1: the canonical SOP (sum of minterms)
For each row where the output is 1, write a minterm: the AND of every variable, where a variable appears plain if it is 1 in that row and complemented if it is 0. Then OR all the minterms.
Example truth table:
| Row | ||||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| 2 | 0 | 1 | 0 | 0 |
| 3 | 0 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 | 0 |
| 5 | 1 | 0 | 1 | 1 |
| 6 | 1 | 1 | 0 | 1 |
| 7 | 1 | 1 | 1 | 1 |
in rows 1, 3, 5, 6 and 7, so and
This expression is correct but not minimal.
Step 2a: simplify with Boolean algebra
The key identity is adjacency: . Two terms that differ only in one variable merge and lose that variable.
- (they differ only in ).
- .
- .
- . Using a second time is allowed, because .
So
Check: row 6 () gives ✓. Row 4 () gives ✓. Rows 0 and 2 give ✓.
Step 2b: simplify with a Karnaugh map
The map orders the columns in Gray code (), so neighbouring cells differ in one variable:
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | 1 |
- The four 1s in columns and form a group where only stays constant, giving .
- The pair in row , columns and , gives .
That again yields . Rules: groups must be rectangles of size 1, 2, 4 or 8; make them as large as possible; overlapping is allowed; the map wraps around at the edges.
Don’t-care conditions
If some input combinations can never occur, mark them X. You may include them in a group if that makes the group larger, and otherwise ignore them. The calculator above accepts don’t-cares separately from the minterms.
For more than four variables
Karnaugh maps become unwieldy beyond four or five variables. The Quine–McCluskey method does the same merging systematically: list the minterms, repeatedly combine pairs that differ in one bit to find the prime implicants, then choose a minimal set that covers every minterm. This is what the calculator does.
Common mistakes
- Complementing the wrong way. A 0 in the row means the variable appears complemented in the minterm.
- Missing the wrap-around in a K-map: the first and last columns are adjacent.
- Stopping at non-maximal groups, which leaves extra literals.
- Confusing SOP with POS. For a product of sums, use the rows where , and write each maxterm as an OR with the opposite complement rule.
References
- Mano, M. M. & Ciletti, M. D. (2018). Digital Design (6th ed.), Chapters 2–3. Pearson.
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.