Boolean Truth Table Generator
Type a boolean expression with variables like A, B and C and get the full truth table for every combination of inputs. Supports the common logic operators and parentheses, and shows how many rows come out true.
How to generate a truth table
- Type a boolean expression using variables and operators, for example A AND (B OR C).
- Read the generated table: one column per variable plus a result column for every combination of inputs.
- Switch between T/F and 1/0, check the count of true rows, then copy the table.
Examples
Conjunction
A AND B
4 rows; the result is true only when A and B are both true.
Grouped expression
(A AND B) OR C
8 rows over A, B and C; true whenever C is true or both A and B are true.
Frequently asked questions
Which operators are supported?
NOT (also ! or ~), AND (&&, &, *), OR (||, |, +), XOR (^), NAND, NOR, XNOR, IMPLIES (->) and IFF (<->). Operator names are case-insensitive and you can group with parentheses. The constants TRUE, FALSE, 1 and 0 are also allowed.
What is the order of precedence?
From tightest to loosest binding: NOT, then AND, then XOR, then OR, then IMPLIES, then IFF. NOT and IMPLIES are right-associative; the others are left-associative. Use parentheses when you want a different grouping.
How are variables named?
A variable is any identifier, so single letters like A, B and C work, and so do whole words like rain or isOpen. Columns appear in the order the variables first show up in your expression.
How many variables can I use?
Up to 12, which is a 4096 row table. The table doubles in size with each extra variable, so the cap keeps it from getting unwieldy. Beyond that the generator reports an error instead of locking up your browser.
Is my expression sent to a server?
No. Parsing and table generation happen entirely in your browser, so nothing you type is uploaded or stored.
What happens with an invalid expression?
If parentheses do not match, an operator is missing an operand, or there is an unexpected character, the generator shows an error message instead of a table so you can fix the input.
Related tools
Set Calculator
Calculate the union, intersection, difference, and symmetric difference of two sets. Check subset and disjoint relationships. Free and instant.
Scientific Notation Converter
Convert numbers to and from scientific notation and E notation. Enter a number or a value like 1.23 x 10^4 to see the standard decimal form. Free and private.
Prime Factorization Calculator
Break any whole number into its prime factors. Get the factorization in exponent form like 2^3 x 3^2 x 5, a factor table, and whether the number is prime.
Area Calculator
Find the area of a circle, square, rectangle, triangle, trapezoid, parallelogram, ellipse, sector or rhombus. Free and runs in your browser.
Arithmetic Sequence Calculator
Find the nth term, the sum of n terms and the full term list for any arithmetic or geometric sequence. Enter the first term, step or ratio, and n.
Average Calculator
Find the mean, median, mode, range, sum, count, min and max of a list of numbers. Paste values separated by commas, spaces or new lines.