Calculates on this device. File exports run online.
Truth Table to Expression
Give a truth table as its minterms, its output column or its rows, and get the minimal sum of products and the minimal product of sums, with the prime implicants, a Karnaugh map for up to four variables and the truth table itself. Or type an expression such as A′B + AC to get its truth table, minterms and maxterms, or check whether two expressions are equal. Every result is checked against the truth table on every row.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your result
How it was worked out
How to use it
- Choose Truth table to expression, name the variables (A, B, C) and give the rows where the output is 1, with any don’t-care rows. Press Find the expression.
- Read the minimal sum of products and product of sums. The table of prime implicants shows which ones are essential.
- Choose Expression to truth table to see the table of an expression, or Are two expressions equal? to compare two.
How it works
- Row numbers: the first variable is the highest bit, so for A, B, C row 5 is A = 1, B = 0, C = 1.
- Quine–McCluskey combines rows that differ in one variable until no more can be combined: the prime implicants. Don’t-care rows may be used in them but need not be covered.
- Essential prime implicants are taken first; the rest are chosen by Petrick’s method, or by an exact search when Petrick’s product grows too large. Minimal means the fewest terms, then the fewest literals.
- The product of sums is the minimal sum of products of the zeros, turned by De Morgan’s laws.
- The browser minimises up to 12 variables. The box below proves the minimal form with a solver for up to 16.