Skip to content
AllCalcHub

Truth Table Generator

Generate a truth table for any Boolean or logic expression with up to 6 variables: a column for each part, tautology or contradiction, equivalence of two statements, the converse and contrapositive, and the minimal sum of products.

About the Truth Table Generator

A truth table lists every combination of true (1) and false (0) for the variables and the expression's value in each, with a column for every part of the expression, the way textbooks build it up.

Give a second expression to test equivalence: two statements are equivalent when their columns match in every row (p → q and ¬q → ¬p, for instance, which is why the contrapositive proves the same thing; the converse q → p does not). For digital electronics, the minterms give the canonical sum of products, and the Quine–McCluskey method reduces it to a minimal one, the same answer a Karnaugh map gives.

The formula

Rows = 2ⁿ for n variables; NOT > AND > XOR > OR > → > ↔

Operators you can type

OperatorWrite as
NOTnot, !, ~, ¬, or A'
ANDand, &, *, ∧
ORor, |, +, ∨
XORxor, ^, ⊕
Implies->, →
If and only if<->, ↔
NAND / NORnand, nor

Worked example

Example: True in = 1 of 4 rows

  1. Input: Boolean expression: A and not B.
  2. Formula: Rows = 2ⁿ for n variables; NOT > AND > XOR > OR > → > ↔
  3. Result: True in = 1 of 4 rows
  4. Classification: a contingency
  5. Minterms Σm: Σm(2)
  6. Maxterms ΠM: ΠM(0, 1, 3)

Questions people ask

Are A → B and not A or B the same?

Yes: enter one as the expression and the other under “Compare with”, and the calculator confirms they're equivalent.

Can I use 1 and 0?

Yes, as constants.

Is the minimal form unique?

Not always: some functions have several minimal sums of products of the same size. Any of them is correct.