DIGITAL · TOOL

Truth Table Generator

Write a boolean expression and instantly get the complete truth table.

Basic No backend · 100% client-side

What it does: Expand a boolean expression into a truth table of all input combinations.

When to use it: When verifying logic circuits, doing digital-logic homework, or seeing the full picture before simplifying.

3 variables · 8 rows
Next

You might also need

How to

How to use the truth table generator

Just enter an expression.

  1. 01

    Enter a boolean expression

    Use single letters A–Z for variables; operators are AND OR NOT XOR or the symbols & | ! ^, and parentheses are allowed.

  2. 02

    Watch as you type

    The truth table is generated live, supporting up to 8 variables (256 rows).

  3. 03

    Read the output column

    Each row is one input combination, and the last column is the expression output (1 = true, 0 = false).

Reference

Operators and notation

Both word forms and symbols are supported, and you can mix them.

OperationWord formSymbolsNotes
NOTNOT! ~ ¬Inversion, unary (highest precedence)
ANDAND& * ·1 only when both are 1
XORXOR^ ⊕1 only when the two differ
OROR| +1 when either is 1 (lowest precedence)

Precedence: NOT > AND > XOR > OR; use parentheses to change the grouping order.

FAQ

Common questions, answered in 3 minutes

Can variables be lowercase?

Yes — the tool treats them all as uppercase. A variable must be a single letter (A, B, C…); multi-letter variable names are not supported.

Are NAND / NOR / XNOR supported?

Not directly for now, but you can express them as combinations: NAND = NOT(A AND B), NOR = NOT(A OR B), XNOR = NOT(A XOR B).

What is the operator precedence?

NOT is highest, then AND, then XOR, and finally OR. When in doubt, adding parentheses is safest, e.g. (A OR B) AND C.

What is the maximum number of variables?

8 (256 rows). More than that and the row count explodes and is no longer human-readable; if you need more, split into sub-expressions.

Data Provenance

Standards and sources referenced by this tool

Item Value / Formula Source
Boolean algebra AND=∧, OR=∨, NOT=¬, XOR=⊕ Boolean algebra (G. Boole)
Row order From all 0s to all 1s, first variable is the most significant bit Standard truth-table convention

Expressions are evaluated by a built-in safe parser (no eval / no Function), with no external API.

⚡ Powered by Circflow