Truth Table Generator
This truth table generator builds the table for any propositional logic expression: type something like A AND (B OR NOT C) and the full table appears with every intermediate step. The tool also tells you whether the expression is a tautology, gives the DNF and CNF, and can compare two expressions.
Source: Wikipedia – Truth table (Aufbau, Zeilenzahl 2^n, Operatoren). Updated: .
How it is calculated
A truth table lists, for every combination of true and false values of the variables, the value a logical expression takes. With n variables it has 2 to the power n rows: two variables give 4, three give 8, eight give 256 rows. The generator adds a column for each sub-expression so you can follow the evaluation step by step.
How to enter expressions
- AND (∧): AND, & or ∧. OR (∨): OR, | or ∨. The caret ^ is read as AND.
- NOT (¬): NOT, ! or ¬. XOR (⊕): XOR or ⊕. NAND and NOR work too.
- Implication (→): -> or →. Equivalence (↔): <-> or ↔.
- Precedence: NOT binds tightest, then AND, XOR, OR, → and finally ↔. The arrow → is read right to left. When in doubt, add parentheses; the “Read as” line shows how the expression was understood.
Tautology, contradiction and normal forms
If the last column is true in every row, the expression is a tautology (such as A ∨ ¬A); if it is false everywhere, it is a contradiction (A ∧ ¬A). Anything in between is satisfiable. The disjunctive normal form (DNF) joins the true rows with OR; the conjunctive normal form (CNF) negates the false rows and joins them with AND. The second input field lets you check laws such as De Morgan’s: ¬(A ∧ B) and ¬A ∨ ¬B are equivalent. To convert numbers between systems, use the number base converter, and for bitwise logic on binary numbers the binary calculator.
Frequently asked questions
How do I make a truth table?
Assign every combination of true and false to the variables (2 to the power n rows), then evaluate the expression from the inside out, one sub-expression per column. The generator does this automatically and shows all steps.
What are the truth tables for AND, OR and XOR?
AND is true only if both inputs are true. OR is true if at least one is true. XOR is true if exactly one is true. Enter A AND B, A OR B or A XOR B to see each table.
What is a tautology?
An expression that is true for every input, such as A ∨ ¬A. Its counterpart, the contradiction, is always false, for example A ∧ ¬A.
What are DNF and CNF?
Normal forms of an expression. The DNF is an OR of AND terms (one per true row), the CNF an AND of OR terms (one per false row). Both can be read straight from the table.
How can I check whether two expressions are equivalent?
Enter both. The tool compares them in every row and gives a counterexample if they differ. Equivalent means that both have the same value in every row.
Sources and legal basis
- Wikipedia – Truth table (Aufbau, Zeilenzahl 2^n, Operatoren)
- Wikipedia – Disjunctive normal form / Conjunctive normal form (normal forms derived from the truth table)
- Wikipedia – Tautology (logic) and De Morgan’s laws
As of: · Editorial policy
Related tools
- Binary Calculator with StepsBinary calculator online: add, subtract, multiply, divide and combine binary numbers with AND, OR, XOR – result also in decimal, hex and two’s complement.
- Number base converter with stepsConvert between binary, octal, decimal, hex and any base from 2 to 36 – with full working, fractions, repeating digits and two’s complement (8–64 bit).
- Combination CalculatorCombination calculator for nCr and nPr, with or without repetition: exact results even for huge numbers, the formula, working and all four cases side by side.
- Probability calculatorProbability calculator: favourable over possible outcomes, two events, repeated trials (binomial) and drawing without replacement, like a lottery.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Twos complement calculatorTwos complement calculator for 4, 8, 16 or 32 bits: turn a negative decimal into binary or read a bit string, with ones complement, hex and the steps.
- Gibbs Free Energy CalculatorGibbs free energy calculator: ΔG = ΔH − TΔS from enthalpy, entropy and temperature, with spontaneity, the crossover temperature and the equilibrium constant K.
- Conic section calculatorConic section calculator: enter Ax² + Bxy + Cy² + Dx + Ey + F = 0 and get the type, standard form, center, axes, foci, vertices and eccentricity.
- Mole fraction calculatorMole fraction calculator for up to three substances from moles or from masses and molar masses – with percentages, a check sum and the calculation steps.