BYTETOOLS

Truth Table Generator

Generate the complete truth table for any boolean expression with AND, OR, NOT, XOR, implies and iff — up to 6 variables, with tautology detection.

3
Variables
8
Rows
Tautology
Classification

Truth table

ABCResult
TTTT
TTFT
TFTT
TFFT
FTTT
FTFT
FFTT
FFFT

The expression is true in every row — a tautology.

What is the Truth Table Generator?

The ByteTools Truth Table Generator builds the complete truth table for any boolean expression over up to six variables.

  • All standard operators: AND, OR, NOT, XOR, IMPLIES, IFF
  • Accepts symbol, textbook and word notations interchangeably
  • Up to 6 variables — 64 rows generated instantly
  • Tautology, contradiction or contingency classification
  • Clear parse errors for malformed expressions
  • Copyable table — 100% local, nothing uploaded

How to use the Truth Table Generator

  1. 1

    Type a boolean expression, e.g. (A & B) | !C or A -> B.

  2. 2

    The table appears instantly with a row for every input combination.

  3. 3

    Read the result column and the tautology / contradiction verdict.

  4. 4

    Copy the table as tab-separated text with one click.

About the Truth Table Generator

The ByteTools Truth Table Generator builds the complete truth table for any boolean expression over up to six variables. It understands AND, OR, NOT, XOR, implication and biconditional in every common notation — symbols like & | ! ^ -> <->, the logic symbols ∧ ∨ ¬ → ↔, or plain words — so you can type expressions exactly as they appear in your textbook.

The expression is parsed by a proper recursive-descent parser with standard precedence (NOT binds tightest, then AND, XOR, OR, then the right-associative implication and finally iff), every combination of inputs is evaluated, and the table is classified as a tautology, contradiction or contingency. Malformed input gets a clear message pointing at the problem.

It is built for discrete-math and logic students, and for programmers simplifying conditions or checking logical equivalences. Everything runs locally in your browser — nothing is uploaded, and the table copies out as tab-separated text ready for pasting into notes or a spreadsheet.

Frequently asked questions

What is a truth table?

A table listing every possible combination of true/false values for an expression's variables, with the expression's result for each. With n variables there are 2ⁿ rows — 2 variables give 4 rows, 6 variables give 64. It is the definitive way to check what a logical formula really says.

What is the truth table for implication (A → B)?

A → B is false in exactly one case: when A is true and B is false. It is true everywhere else, including when A is false — a false premise makes the implication 'vacuously true'. This trips up most students, and seeing the full table is the quickest cure.

What is a tautology?

An expression that is true in every row of its truth table, no matter what the variables are. A classic is (A → B) ∧ (B → C) → (A → C), the transitivity of implication. A contradiction is false in every row, and everything in between is a contingency.

What operator precedence does the generator use?

The standard order: NOT binds tightest, then AND, then XOR, then OR, then IMPLIES (right-associative, so A -> B -> C means A -> (B -> C)), and IFF binds loosest. Use parentheses whenever you want a different grouping — they always win.

How is XOR different from OR?

OR is true when at least one input is true, including both. XOR (exclusive or) is true only when the inputs differ — exactly one of them is true. So T OR T = T, but T XOR T = F. In symbols this tool accepts ^ or ⊕ for XOR.

Related tools