Toolvito

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

Minimal sum of products and product of sums of a truth table, checked on every row.

Your values

Names separated by commas. The first is the highest bit of the row number.

Row numbers where the output is 1, such as 1, 3, 5.

More options

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.

Proved minimal form for up to 16 variables

Proved minimal form for up to 16 variables

The function of the result above is used (from Truth table to expression or Expression to truth table). All prime implicants are found, then a solver chooses the cheapest set and proves that no cheaper one exists, for up to 16 variables.

Truth tables and expressions above stay in your browser. When you use this box, the variable names and the row numbers of the function are sent to the Toolvito server. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

How to use it

  1. 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.
  2. Read the minimal sum of products and product of sums. The table of prime implicants shows which ones are essential.
  3. 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.

Related tools