guide

How to Create a Truth Table Online — Free Boolean Tool (2026)

By Rui Barreira · Last updated: 18 June 2026

A truth table lists every possible combination of inputs for a boolean expression and shows what the expression evaluates to for each combination. The brevio Truth Table Generator does this instantly in your browser — paste any expression using up to four variables and get the full table in one click, free and without signup.

Truth tables are used in digital logic design, computer science coursework, and programming to verify that a boolean formula behaves exactly as intended. They are the standard way to prove logical equivalence, detect redundant conditions, and document decision logic.

How to use the tool

  1. Enter your boolean expression. Use variables A, B, C, or D. Supported operators are && (AND), || (OR), ! (NOT), ^ (XOR), and the keywords NAND and NOR. You can also write the keywords AND, OR, and NOT in uppercase — the tool normalises them automatically.
  2. Use parentheses to control precedence. For example, (A && B) || C evaluates the AND before the OR. Without parentheses, the default precedence is: NOT binds tightest, then AND, then XOR, then OR.
  3. Click a preset if you want to start from a common expression like A XOR B or A NAND B.
  4. Click Generate Truth Table. The tool produces all 2ⁿ rows (where n is the number of distinct variables) and displays T/F values for each input combination, with the final result highlighted in the last column.

Operator reference

The table below shows what each operator means and how to write it in the expression box.

AND (&&)
True only when both operands are true. A && B is true for exactly one row out of four.
OR (||)
True when at least one operand is true. A || B is false only when both are false.
NOT (!)
Inverts the value. !A flips every T to F and every F to T.
XOR (^)
True when operands differ. A ^ B is true when exactly one of A or B is true.
NAND
The inverse of AND. True for all rows except when both inputs are true.
NOR
The inverse of OR. True only when both inputs are false.

Working with 3 and 4 variables

With three variables (A, B, C) the table has 8 rows (2³). With four variables (A, B, C, D) it has 16 rows (2⁴). The tool handles up to four variables without any configuration change — just include them in your expression and the table adjusts automatically.

Tips for logic design work

To verify that two expressions are logically equivalent, generate the truth table for each and compare the result columns. If they are identical for every row, the expressions are equivalent. This is useful when simplifying complex conditions in code — write the original expression, simplify it manually, and check both truth tables match.

Related tools: Bitwise Calculator · Number Base Converter

Frequently Asked Questions

What operators does the truth table generator support?
Supported operators are && (AND), || (OR), ! (NOT), ^ (XOR), and the keywords NAND and NOR. You can also write AND, OR, and NOT in uppercase — the tool normalises them automatically.
How many variables can I use?
You can use up to four variables: A, B, C, and D. With four variables the table has 16 rows (2⁴).
How do I verify two expressions are logically equivalent?
Generate the truth table for each expression and compare the result columns. If they are identical for every row, the expressions are equivalent.
More free toolsSee all 469
Merge PDFsCompress ImageJSON FormatterPassword GeneratorVAT CalculatorQR Code Generator
How to Create a Truth Table Online — Free Boolean Tool (2026) | brevio