Truth Table Generator
One Boolean expression per line (max 6). Operators: NOT / AND / OR / XOR / -> / <->, or ! && || ⊕ → ↔; precedence NOT > AND > XOR > OR > implies > equivalence; up to 8 variables (256 rows)
Value format:
Calculation Result
Download CSV
Introduction to the tool and how to use it
Truth Table Generator - type one Boolean expression and get the full truth table together with the minterm (sum of products) and maxterm (product of sums) canonical forms. A handy helper for digital logic, discrete maths and propositional calculus.
Supported operators (case insensitive, symbolic forms also accepted):
- NOT
- AND
- XOR
- OR
- implication
- equivalence
- parentheses, plus the constants
Precedence (low to high): equivalence ↔ < implication → < OR ∨ < XOR ⊕ < AND ∧ < NOT ¬. Implication is right associative, so
How to use:
1. Type your Boolean expression, one per line (up to 6 lines - several expressions share one set of variable columns and get one result column each), e.g.
2. Pick the display format,
3. Hit Run: the table shows the row number, every variable, one result column per expression and a note column with the minterm number m of that row; the output box also holds a monospaced copy of the table plus both canonical forms;
4. Copy the result or export it as CSV.
Variables are detected automatically: a single letter A-Z, or a letter followed by digits such as
Reading the two canonical forms: rows are numbered in variable order with the first variable as the most significant bit, and the row number is the minterm index m. The rows where the result is true form the minterm form Σm(4, 6, 7) (sum of products); the rows where it is false form the maxterm form ΠM(0, 1, 2, 3, 5) (product of sums). For a tautology ΠM() is empty (an empty product is 1) and for a contradiction Σm() is empty (an empty sum is 0).
Expressions are parsed by a built-in tokenizer plus recursive-descent parser and evaluated on the syntax tree - no eval involved. When something is wrong you get a specific message: unknown character, unknown identifier, unbalanced parentheses or a missing operand.
Supported operators (case insensitive, symbolic forms also accepted):
- NOT
NOT / ! / ¬ / ~- AND
AND / && / ∧ / &- XOR
XOR / ⊕ / ^- OR
OR / || / ∨ / |- implication
-> / → / =>- equivalence
<-> / ↔ / <=> / ≡- parentheses, plus the constants
0 / 1.Precedence (low to high): equivalence ↔ < implication → < OR ∨ < XOR ⊕ < AND ∧ < NOT ¬. Implication is right associative, so
A -> B -> C means A → (B → C); the other operators associate to the left. What you type is echoed back with the mathematical symbols ∧ ∨ ¬ ⊕ → ↔, so you can see exactly how it was understood.How to use:
1. Type your Boolean expression, one per line (up to 6 lines - several expressions share one set of variable columns and get one result column each), e.g.
A AND (B OR NOT C);2. Pick the display format,
T/F or 1/0;3. Hit Run: the table shows the row number, every variable, one result column per expression and a note column with the minterm number m of that row; the output box also holds a monospaced copy of the table plus both canonical forms;
4. Copy the result or export it as CSV.
Variables are detected automatically: a single letter A-Z, or a letter followed by digits such as
p1 or A12. Names are case insensitive and shown in upper case. At most 8 variables - that is 2^8 = 256 truth table rows - and going over raises a clear message.Reading the two canonical forms: rows are numbered in variable order with the first variable as the most significant bit, and the row number is the minterm index m. The rows where the result is true form the minterm form Σm(4, 6, 7) (sum of products); the rows where it is false form the maxterm form ΠM(0, 1, 2, 3, 5) (product of sums). For a tautology ΠM() is empty (an empty product is 1) and for a contradiction Σm() is empty (an empty sum is 0).
Expressions are parsed by a built-in tokenizer plus recursive-descent parser and evaluated on the syntax tree - no eval involved. When something is wrong you get a specific message: unknown character, unknown identifier, unbalanced parentheses or a missing operand.
Message board
All messages →-
No one has spoken up yet — want to go first?