logo

johzu

About

Truth tables

Truth values

In propositional logic, a proposition is a statement that can be assigned one of two truth values: true or false.

Truth tables organize all possible combinations of truth values and show how a compound proposition behaves in each case.

$$V=\text{true},\qquad F=\text{false}$$

Logical connectors

Compound propositions are built using logical connectors. The most common ones are conjunction, disjunction, negation, implication, and biconditional.

Connector Meaning
\(\land\) A conjunction is true if and only if both propositions are true.
\(\lor\) A disjunction is true if at least one of the propositions is true.
\(\neg\) A negation changes the truth value of a proposition.
\(\Rightarrow\) An implication is false only when the antecedent is true and the consequent is false.
\(\Leftrightarrow\) A biconditional is true when both propositions have the same truth value.

Truth tables for each operator

The following small tables summarize the behavior of each logical operator.

Negation

\(p\) \(\neg p\)
V F
F V

Conjunction

\(p\) \(q\) \(p\land q\)
V V V
V F F
F V F
F F F

Disjunction

\(p\) \(q\) \(p\lor q\)
V V V
V F V
F V V
F F F

Implication

\(p\) \(q\) \(p\Rightarrow q\)
V V V
V F F
F V V
F F V

Biconditional

\(p\) \(q\) \(p\Leftrightarrow q\)
V V V
V F F
F V F
F F V

Building a truth table

To build a truth table, first list the possible values of the simple propositions. Then compute each intermediate column until you reach the final compound proposition.

For two variables there are four rows, and for three variables there are eight rows.

$$\text{number of rows}=2^n$$

Example

For the proposition \(p\land q\), the final column is true only when both \(p\) and \(q\) are true.

\(p\) \(q\) \(p\land q\)
V V V
V F F
F V F
F F F

Worked example with three variables

As an example, let us solve the truth table for \((p\lor q)\land \neg r\). First compute \(p\lor q\), then compute \(\neg r\), and finally combine both columns with \(\land\).

\(p\) \(q\) \(r\) \(p\lor q\) \(\neg r\) \((p\lor q)\land \neg r\)
V V V V F F
V V F V V V
V F V V F F
V F F V V V
F V V V F F
F V F V V V
F F V F F F
F F F F V F

Classification

Once the final column is complete, the proposition can be classified as a tautology, contradiction, or contingency.

Tautology: the final column is always true.

Contradiction: the final column is always false.

Contingency: the final column contains both true and false values.

Practice activity

Use the following activity to generate a random logical proposition and reveal the truth table step by step.

Pirate map of truth tables

Solve a logical proposition by revealing the treasure route step by step.

Captain's instructions

🗺️ Each proposition is a map. The columns are clues.

⚓ Press Show next step to reveal one clue at a time.

💰 The last column decides the logical treasure.

Treasure rules:
Connector Definition
\(\land\) A conjunction is true if and only if both propositions are true.
\(\lor\) A disjunction is true if at least one of the propositions is true.
\(\neg\) A negation is true if and only if the negated proposition is false.
\(\Rightarrow\) a) An implication is true when the consequent is true or the antecedent is false.
b) It is false only when the antecedent is true and the consequent is false.
\(\Leftrightarrow\) A biconditional is true if and only if both propositions have the same truth value.
📜 Current logic map
Step 0 of 5

See also

Sets