Education / Boolean algebra
Truth Table Generator: Boolean Expressions and Minimal SOP
Enter a boolean expression with up to eight variables using words, mathematical symbols or programming operators. Read the truth table, exact minimal sum of products and canonical forms, or export the rows as CSV.
Truth Table Generator: Boolean Expressions and Minimal SOP: Lists every combination of high and low inputs. Quine–McCluskey finds prime implicants, and an exact cover search chooses the fewest product terms, then the fewest literals. Canonical SOP includes every true minterm; canonical POS includes every false maxterm. No don't-care conditions are assumed. Runs 100% locally in your browser with zero server file uploads.
- Category
- School & study tools
- Runs
- In your browser
- Cost
- Free · no sign-up
- Availability
- Ready to use
Runs entirely in your browser
Use and / ∧ / & / *, or / ∨ / | / +, not / ¬ / ! / ~ / a trailing apostrophe, and xor / ⊕ / ^. Precedence: NOT, AND, XOR, OR. Variables are case-sensitive; use explicit operators between variables.
Minimal sum of productsA ∧ ¬B
Canonical SOP(A ∧ ¬B)
Canonical POS(A ∨ B) ∧ (A ∨ ¬B) ∧ (¬A ∨ ¬B)
2 variables · 4 rows. The minimum uses the fewest product terms, then the fewest literals.
| A | B | Result |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Boolean logic
MIT OpenCourseWare, Computation Structures, Combinational Logic. https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/ . A minterm is true for one assignment; a maxterm is false for one assignment.
Exact minimisation
E. J. McCluskey, Minimization of Boolean Functions, Bell System Technical Journal 35 (1956), 1417–1444. https://doi.org/10.1002/j.1538-7305.1956.tb03835.x . Prime implicants are combined by Quine–McCluskey and selected by an exact cover search equivalent to solving the prime-implicant chart.
How to use it
- Enter an expression such as A and not B, A ∧ ¬B, A & !B, A*B' or A + B.
- Read the truth table and compare the minimal sum of products with canonical SOP and POS.
- Download CSV for a worksheet or further study.
Privacy & limitations
Your expression and truth table stay in your browser. CSV export is a local download.
Related tools
Frequently asked questions
Which operators can I use?
NOT: not, ¬, !, ~ or an apostrophe after a variable or group. AND: and, ∧, & or *. OR: or, ∨, | or +. XOR: xor, ⊕ or ^. Use parentheses and explicit operators; AB is one variable name.
What is the order of operations?
NOT binds first, then AND, then XOR, then OR. Variable names are case-sensitive and begin with a letter; they may contain letters, digits and underscores. The words and, or, xor and not are reserved.
Is the minimum unique?
Some expressions have several equally small sums of products. The tool returns one exact solution with the fewest product terms and, among those solutions, the fewest literals.
How large can the expression be?
Up to eight distinct variables and 2000 characters. Eight variables produce 256 truth-table rows. Constant expressions 0 and 1 are supported.
Free tool · runs in your browser · no account required