Nexus Learn

Truth table generator

Type a logic expression and get its full truth table. Use the letters A to E for your variables. Free, instant, and it runs in your browser.

Operators you can use

MeaningWrite it as
NOTNOT A, !A or ~A
ANDA AND B, A & B or A && B
ORA OR B, A | B or A || B
XOR (one or the other, not both)A XOR B or A ^ B
Implies (if A then B)A -> B or A IMPLIES B

Order of work: NOT first, then AND, then XOR, then OR, then implies. Use brackets to be clear.

What is a truth table?

A truth table lists every possible combination of true (1) and false (0) values for the variables, and shows the result of the expression for each one. With n variables there are 2n rows. They are used in digital logic, programming conditions and discrete mathematics.

Tautology, contradiction and contingency

If the result column is all 1s, the expression is a tautology (always true). If it is all 0s, it is a contradiction (always false). Otherwise it is a contingency. The generator tells you which one your expression is.

Useful laws to remember

De Morgan: NOT (A AND B) is the same as (NOT A) OR (NOT B). Try both in the generator and compare the result columns.

More free tools: number base converter · CS MCQs · Big-O cheat sheet