Result summary
How it’s calculated
Truth table
Canonical forms / Simplified SOP
How to use this truth table calculator
Enter one Boolean expression to generate its table, or add a second expression to check equivalence row by row. The page keeps the workflow compact: input, result summary, step log, table, and canonical forms are all visible in one place.
How it works
The tool tokenises your expression, builds an internal syntax tree, sorts variables alphabetically, and enumerates rows from 0 upward with the first variable as the most significant bit. Canonical DNF/CNF come directly from the rows where the result is 1 or 0, and simplification uses Karnaugh-style grouping up to 4 variables, Quine–McCluskey for 5–6 variables, then canonical fallback above that range.
When to use
Use this page for Boolean algebra homework, digital logic verification, equivalence checks such as A -> B versus ~A | B, or for explaining why two formulas diverge on specific assignments.
Common mistakes to avoid
- Mixing implication/equivalence syntax with arithmetic-style notation.
- Forgetting parentheses and assuming a different operator precedence.
- Reading mismatch rows without checking the alphabetical variable order shown in the summary.
- Expecting simplified SOP to stay available above the supported simplification range.
Interpretation and worked example
A quick equivalence check is to compare A -> B with ~A | B. If the summary reports equivalence, both formulas produce the same bitstring. If mismatch rows appear, use the F₁ / F₂ / ≡ columns in the table to inspect the exact assignments where the two expressions disagree.
See also
FAQ
Which operators can I use?
Use ! or ~ for NOT, & or ∧ for AND, ^ for XOR, | or ∨ for OR, -> for implication, <-> for equivalence, and constants 0, 1, T, F.
How does the simplification choose Karnaugh vs Quine–McCluskey?
Up to four variables the tool groups minterms in the same way as a Karnaugh map. Five or six variables switch to Quine–McCluskey with Petrick selection. More than six falls back to the canonical DNF.
Are variable names case-sensitive, and how are rows ordered?
Variable names are treated case-insensitively, then normalised and sorted alphabetically. The first variable in that alphabetical list is used as the most significant bit when rows are enumerated from 0 upward.
What is the practical variable limit, and when does canonical DNF fallback happen?
Up to 10 distinct variables are supported. The simplifier uses Karnaugh-style grouping up to 4 variables, Quine–McCluskey for 5 or 6, and falls back to the canonical DNF above that range.
How should I read F₂ and the mismatch rows in equivalence mode?
F₁ is the first expression, F₂ is the second, and ≡ shows whether the row matches. If mismatch rows are listed in the summary, jump to those row numbers in the paginated table to see exactly which assignments differ.
Understanding the outputs
Result summary
The summary shows the detected variables, counts of 1 and 0 rows, the full bitstring, and a hexadecimal shorthand. In equivalence mode it also tells you whether both expressions generate the same table.
Step log
The step log records the parsed form, variable order, enumerated rows, minterms, and the simplification method that was used. It is designed to support teaching, debugging, and review rather than just giving a final answer.
Canonical forms and simplification
Canonical DNF/CNF are derived directly from the truth table. The simplified SOP is provided when the selected method can reduce the expression without exceeding the supported simplification range.
Equivalence mode
When a second expression is supplied, the table adds F₂ and ≡ columns. Use these columns together with the mismatch row list in the summary to identify exactly where two formulas diverge.
Variable limits
The page supports up to 10 distinct variables. Above the small-variable range, the tool keeps the truth table exact but falls back from advanced simplification to canonical output when necessary.