Truth Table Generator

Generate complete truth tables for any Boolean expression with up to six variables. Supports AND, OR, NOT, XOR, NAND, NOR, XNOR, and parentheses. 100% client-side — no uploads.

Truth Table Generator

Boolean logic, visualized
Type an expression and see every possible outcome
Operators: AND OR NOT XOR NAND NOR XNOR ( )

How to Use the Truth Table Generator

  1. Enter a Boolean expression — use uppercase variable names (A, B, C…) and the operators below.
  2. Generate — the table shows every combination of inputs and the result.
  3. Read the output — green cells are true, red are false; the result column is highlighted.

Example: (A OR B) AND NOT (A AND B) is the XOR truth table. Try it!

Why Use This Truth Table Generator

Truth tables are essential for studying logic, digital electronics, and computer science. This generator handles the tedious enumeration automatically so you can focus on understanding the logic — whether you're learning Boolean algebra, designing circuits, or preparing for an exam.

Frequently Asked Questions

A truth table lists every possible combination of input values and the corresponding output of a Boolean expression. For n variables there are 2n rows.

AND, OR, NOT, XOR, NAND, NOR, XNOR, plus parentheses for grouping. Operator precedence is NOT, then AND, then OR, and you can always override it with parentheses.

NAND (not AND) outputs the opposite of AND: it's false only when both inputs are true. NAND gates are interesting because any logic circuit can be built from them alone.