Home › Tools › Truth Table Generator

Truth Table Generator

Generate complete truth tables for boolean logic expressions. Calculate logic values directly on your device.

Output format
Supports AND, OR, NOT, XOR, NAND, NOR, XNOR, primes (A'), and implication (→).
VariablesA, B, C (3)
Total Rows8 (2^3)
ClassificationContingency
True / False5 T / 3 F
Minterms (SOP): Σm(0, 2, 4, 6, 7)
Maxterms (POS): ΠM(1, 3, 5)
Truth Table
RowABCResult (F)
m00001
m10010
m20101
m30110
m41001
m51010
m61101
m71111

About this tool

Truth Table Generator parses and evaluates compound boolean logic expressions to generate exhaustive truth tables for up to six discrete variables. It supports fundamental logic gates (AND, OR, NOT, XOR, NAND, NOR, XNOR), algebraic prime notation (A′A'), material implication (→\rightarrow), and equivalence (↔\leftrightarrow). The tool automatically classifies expressions into tautologies, contradictions, or contingencies and outputs minterm (Σm\Sigma m) and maxterm (ΠM\Pi M) canonical index representations.

When to use it

  • Verify homework and laboratory proofs for Discrete Mathematics and Digital Logic Design courses
  • Determine logical equivalence between complex conditional propositions
  • Identify whether a boolean expression is a tautology, contradiction, or contingent formula
  • Extract canonical Sum of Products (SOP) minterms and Product of Sums (POS) maxterms for circuit synthesis
  • Export logic tables directly into academic Markdown or CSV formats for lab reports

How to use it

To generate a truth table

  1. Enter your boolean formula in the Boolean expression field or click the helper buttons to insert variables (A,B,C,DA, B, C, D) and logic operators.
    • Conjunction (AND): Enter AND, *, &, or ∧.
    • Disjunction (OR): Enter OR, +, |, or ∨.
    • Negation (NOT): Enter NOT, !, ~, or postfix prime A'.
    • Exclusive OR (XOR): Enter XOR, ^, or ⊕.
    • Conditional Implication: Enter -> or →.
    • Biconditional: Enter <-> or ↔.
  2. Select your preferred display under Output format:
    • Binary (0 / 1): Ideal for computer architecture and digital circuit design.
    • Boolean (T / F): Standard for propositional calculus and formal philosophy proofs.
  3. Review the summary metrics showing total variables (nn), total truth rows (2n2^n), logical classification, and canonical minterms.
  4. Use Copy Markdown or Copy CSV to transfer the complete formatted table to your clipboard.

Questions

What constitutes a tautology, contradiction, or contingency?

In propositional logic:

  • Tautology: A statement that evaluates to True (11) across every possible row of its truth table regardless of variable assignments (for example: A∨¬AA \lor \neg A).
  • Contradiction: A statement that evaluates to False (00) across every row of its truth table (for example: A∧¬AA \land \neg A).
  • Contingency: A statement whose truth value depends on the truth values of its constituent variables, resulting in a mixture of True and False outputs.

How do minterms and maxterms correspond to truth table rows?

For an nn-variable truth table with variables ordered alphabetically:

  • A minterm (mim_i) represents a product term that produces a 11 for exactly row ii in the table. The Sum of Products (SOP) expression is represented as:

F=∑m(i1,i2,…,ik)F = \sum m(i_1, i_2, \dots, i_k)

  • A maxterm (MiM_i) represents a sum term that produces a 00 for row ii. The Product of Sums (POS) expression is represented as:

F=∏M(j1,j2,…,jm)F = \prod M(j_1, j_2, \dots, j_m)

What is the operator precedence for boolean evaluation?

When parentheses are omitted, expressions are evaluated in the following hierarchy:

  1. Parentheses: (...)
  2. Negation (NOT): NOT, !, ~, '
  3. Conjunction (AND, NAND): AND, &, *, NAND
  4. Exclusive Disjunction (XOR, XNOR): XOR, XNOR
  5. Disjunction (OR, NOR): OR, |, +, NOR
  6. Conditional (Implication): ->, →