Truth Table Generator
Build a truth table without executing the expression as code. Supported operators are NOT (!), AND (&&), XOR (^), OR (||), implication (->), equivalence (<->), and parentheses.
A QUICK WALKTHROUGH
How to use this tool
- Enter an expression using variable names, constants 0 or 1, and supported operators.
- Generate all input combinations.
- Read the final value for each row.
Safe expression grammar
The expression is tokenized and parsed as Boolean syntax; it is never run as JavaScript. Keywords NOT, AND, XOR, and OR are accepted without regard to letter case.
Bounded output
At most eight distinct variables and 256 output rows are allowed. Variable names must start with a letter or underscore and may then contain digits.
GOOD TO KNOW
Common questions
Which values count as true?
Use the constant 1 for true and 0 for false. Generated rows display both input and result values as 1 or 0.
What is the operator order?
From strongest to weakest: NOT, AND, XOR, OR, implication, then equivalence. Parentheses override that order.