Truth Table Generator
Write a boolean expression and instantly get the complete truth table.
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.
MEANS Rows where the output column is 1 are the input combinations that make the expression true.
No history yet. Each calculation is automatically saved to this device.
How to use the truth table generator
Just enter an expression.
- 01
Enter a boolean expression
Use single letters A–Z for variables; operators are
AND OR NOT XORor the symbols& | ! ^, and parentheses are allowed. - 02
Watch as you type
The truth table is generated live, supporting up to 8 variables (256 rows).
- 03
Read the output column
Each row is one input combination, and the last column is the expression output (1 = true, 0 = false).
Operators and notation
Both word forms and symbols are supported, and you can mix them.
| Operation | Word form | Symbols | Notes |
|---|---|---|---|
| NOT | NOT | ! ~ ¬ | Inversion, unary (highest precedence) |
| AND | AND | & * · | 1 only when both are 1 |
| XOR | XOR | ^ ⊕ | 1 only when the two differ |
| OR | OR | | + | 1 when either is 1 (lowest precedence) |
Precedence: NOT > AND > XOR > OR; use parentheses to change the grouping order.
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.
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.