Truth tables for Boolean expressions

Symbols:
Common mathematical symbols

Boolean expressions

A Boolean expression is an expression consisting of variables and truth values (true and false) connected with various logical operators. The basic operators are and, or and not (negation), from which all other operators can be derived.

There are many different ways to write the same expression. The following table lists all the symbols that the tool recognizes and shows for what purpose they are used. If an expression contains a word that is not listed it will instead be treated as a variable.

True: T, 1, true
False: F, 0, false
Negation: ¬, !, ~, -, not ′, '
And: ∧, ·, *, &&, &, and
Or: ∨, +, ||, |, or
Exclusive or: ⊕, !=, ^, xor
Equivalence: ⇔, <=>, ==, =
Implication: ⇒, =>

Truth tables

A truth table shows the evaluation of a Boolean expression for all the combinations of possible truth values that the variables of the expression can have. Truth tables often makes it easier to understand the Boolean expressions and can be of great help when simplifying expressions. It can also be used to compare two different expressions by showing them side-by-side in the same table.

Not (negation)

The not operator is used to negate an expression. This means that true becomes false, and false becomes true.

a¬a
TF
FT

And (conjunction)

The and operator is a binary operator that results in true if both operands are true. If one or both of the operands are false the result is false.

abab
TTT
TFF
FTF
FFF

Or (disjunction)

The result of the or operator is true if at least one of the operands are true. The result is only false if both operands are false.

abab
TTT
TFT
FTT
FFF

Exclusive or

Exclusive or is similar to the or operator with the only difference being that the result is false if both operands are true. Another way to think about it is that the result is true if the two operands have different values, otherwise the result is false.

abab(a ∧ ¬b) ∨ (¬ab)
TTFF
TFTT
FTTT
FFFF

Equivalence

Two expressions are equivalent if they result in the same truth value.

abab(ab) ∨ (¬a ∧ ¬b)
TTTT
TFFF
FTFF
FFTT

Implication

An implication is false if the first operand is true while the second operand is false. The implication is true in all other cases.

abab¬ab
TTTT
TFFF
FTTT
FFTT