Logic Truth Table Generator: Minterms, Maxterms and Simplified Boolean Expression

Build the truth table of a logic function, list its minterms and maxterms, simplify it, or check whether two functions are the same.

Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.

How this calculator works

Choose a standard function (AND, OR, NAND, NOR, XOR, XNOR, implication, majority, multiplexer, exactly one) and the number of inputs from 2 to 4. The calculator draws the full truth table with every combination of A, B, C and D, and lists the rows where the output is 1 (minterms) and 0 (maxterms).

It writes the canonical sum of products and product of sums, then simplifies the function with the Quine-McCluskey method to the smallest sum of products. It also says whether the function is a tautology (always 1) or a contradiction (always 0).

To describe your own function, use the output-number case: read the output column with the bottom row as the leftmost binary digit. To test a law such as De Morgan, use the compare case: two functions that give the same table are equivalent.

Formulas used

  • \overline{A\cdot B} = \overline{A} + \overline{B}
  • \overline{A + B} = \overline{A}\cdot\overline{B}
  • A \oplus B = A\overline{B} + \overline{A}B
  • A \Rightarrow B = \overline{A} + B

Worked example

With the default numbers in the calculator above:

  1. The function: XOR of 3 inputs
  2. Truth table: 8 rows: the output is 1 in 4 of them
  3. Minterms (rows where F is 1): 4 minterms: m(1, 2, 4, 7)
  4. Maxterms (rows where F is 0): 4 maxterms: M(0, 3, 5, 6)
  5. Canonical sum of products for F: A'B'C + A'BC' + AB'C' + ABC
  6. Canonical product of sums for F: (A + B + C)(A + B' + C')(A' + B + C')(A' + B' + C)
  7. Simplest sum of products for F: ABC + AB'C' + A'BC' + A'B'C
  8. Type of function: Contingent: sometimes 1, sometimes 0

Change the numbers in the calculator to see the full working, every step, for your own case.

A second worked example

A different case, with these numbers: Number of inputs (A, B, C, D) 2; Function (or the first function when comparing) AND (all inputs high).

  1. The function: AND of 2 inputs
  2. Truth table: 4 rows: the output is 1 in 1 of them
  3. Minterms (rows where F is 1): 1 minterm: m(3)
  4. Maxterms (rows where F is 0): 3 maxterms: M(0, 1, 2)
  5. Canonical sum of products for F: AB
  6. Canonical product of sums for F: (A + B)(A + B')(A' + B)
  7. Simplest sum of products for F: AB
  8. Type of function: Contingent: sometimes 1, sometimes 0

Common questions

What is a minterm?

A row of the truth table where the output is 1, written as an AND of every input (complemented where the input is 0). OR the minterms together to get the canonical sum of products.

How is a function simplified?

Terms that differ in a single input are merged, over and over, then the fewest merged terms that cover every 1 are chosen. It is the same result a Karnaugh map gives.

What does the output number mean?

The output column read as a binary number with the bottom row (all inputs 1) as the leftmost digit. For two inputs AND is 8, OR is 14, XOR is 6, NAND is 7 and NOR is 1.

Can I use it for PLC and ladder logic?

Yes. Series contacts are AND and parallel contacts are OR. The ladder logic calculator on this site tests a specific start and stop circuit.

Related calculators

Got a question about this? Ask an engineering question and get a plain-language answer with references.

Further reading: Mano and Ciletti, Digital Design (Boolean algebra and minimisation); Rosen, Discrete Mathematics and Its Applications (Boolean functions).

Need a calculator we do not have?

Tell us what you would like to calculate. We read every request and build the most asked-for ones.

We store your request (and your email if you give it) to decide what to build. We do not store the numbers you type into calculators.

Embed this calculator on your own page

Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.

Need this drawn, designed or checked?

Drafting Central is a mechanical engineering and drafting business working with customers across Australia and around the world. A calculator gives you the numbers; we can turn them into drawings and designs.

Need help with a real project?

Talk to Drafting Central →

← All engineering calculators