A classical bust of the ancient Greek philosopher Socrates.
A truth table is a mathematical table used in logic. It helps us understand how different logical ideas, called expressions, work together. Think of it like a chart that shows what happens when we combine yes-or-no questions in different ways. For example, if we ask "Is it raining AND is it cold?" the truth table can tell us when this whole statement would be true.
Truth tables have columns for each question or input, like A and B, and one final column that shows the answer to the whole logical operation, like whether A XOR B is true. Each row shows one possible set of answers to the questions, such as "A is yes and B is no," and what the final result would be for that case.
The idea of a truth table was developed by Ludwig Wittgenstein in his book Tractatus Logico-Philosophicus, finished in 1918 and published in 1921. Around the same time, in 1921, another person named Emil Leon Post came up with a similar system on his own. Truth tables are important because they help mathematicians, computer scientists, and logicians see patterns and solve problems in a clear and organized way.
History
Truth tables have a long and interesting history in logic. Researchers have found that C.S. Peirce may have been the first person to create a truth table matrix way back in 1883. Later, in 1997, John Shosky found more evidence in old notes from a lecture by Bertrand Russell from 1912. These notes included matrices for logical operations like negation and material implication, showing that the idea of truth tables was developing even earlier than many people thought.
Applications
Truth tables are useful tools in logic. They can show that different logical expressions mean the same thing by listing all possible combinations of true and false values for the variables and the results of the expressions.
Truth tables are also important in digital electronics. They help describe how basic operations, like adding binary numbers, work by showing all possible inputs and outputs. For example, adding two binary digits (0 or 1) can be shown in a truth table with four rows, representing all possible combinations of the two digits.
( p → q ) ≡ ( ¬ p ∨ q ) {\displaystyle (p\rightarrow q)\equiv (\neg p\vee q)}
p {\displaystyle p}
q {\displaystyle q}
¬ p {\displaystyle \neg p}
¬ p ∨ q {\displaystyle \neg p\vee q}
p → q {\displaystyle p\rightarrow q}
T
T
F
T
T
T
F
F
F
F
F
T
T
T
T
F
F
T
T
T
Binary addition
A
B
C
R
T
T
T
F
T
F
F
T
F
T
F
T
F
F
F
F
Methods of writing truth tables
Different people have different ways of filling in the columns on the left side of a truth table, but it doesn't change the logic. One common way, suggested by Lee Archie from Lander University, is to list the variables in alphabetical order. The number of rows needed is 2n, where n is the number of variables. You start from the right column and alternate T (for true) and F (for false), then move left, doubling the number of T's and F's each time until all rows are filled.
Another method, suggested by Colin Howson, starts with all T’s, then lists all ways to mix T’s and F’s step by step, ending with all F’s. Both methods help create tables that show how logical expressions change with different combinations of true and false values for their variables. These tables can show if expressions are always true or sometimes false, which helps in understanding logic better. Main articles: Truth function, Logical equivalence.
P {\displaystyle P}
Q {\displaystyle Q}
R {\displaystyle R}
P → ( Q ∨ R → ( R → ¬ P ) ) {\displaystyle P\rightarrow (Q\vee R\rightarrow (R\rightarrow \neg P))}
T
T
T
F
T
T
F
T
T
F
T
F
T
F
F
T
F
T
T
T
F
T
F
T
F
F
T
T
F
F
F
T
A {\displaystyle A}
B {\displaystyle B}
C {\displaystyle C}
( A → C ) ∧ ( B → C ) {\displaystyle (A\rightarrow C)\land (B\rightarrow C)}
( A ∨ B ) → C {\displaystyle (A\vee B)\rightarrow C}
T
T
T
T
T
T
T
F
F
F
T
F
T
T
T
F
T
T
T
T
F
F
T
T
T
F
T
F
F
F
T
F
F
F
F
F
F
F
T
T
Size of truth tables
If there are n input variables, then there are 2n possible combinations of their values. For each combination, a function can result in either true or false. This means the number of different functions for n variables is the double exponential 22n.
Truth tables for functions with three or more variables are rarely shown because they become very large and hard to manage.
Function tables are like truth tables, but they show how outputs change based on different values of variables. For example, in an XOR gate, a value G can decide whether to use another value X as it is, or to flip it to its opposite. This helps in making decisions in logic circuits.
A 4-to-1 multiplexer uses two select inputs, S0 and S1, to choose from four data inputs (A, B, C, and D) and produce an output Z. Function tables help show clearly how the output changes with different combinations of these inputs.
G {\displaystyle G}
G ↮ X {\displaystyle G\nleftrightarrow X}
F
X {\displaystyle X}
T
¬ X {\displaystyle \neg X}
S 1 {\displaystyle S_{1}}
S 0 {\displaystyle S_{0}}
Z
F
F
A
F
T
B
T
F
C
T
T
D
Sentential operator truth tables
Truth tables are special tables used in logic to show how different logical statements work. They help us understand if a statement is true or false depending on the values of its parts. For example, if we have two statements, A and B, a truth table will show what happens when we combine them using words like "and," "or," or "if...then."
Each column in a truth table represents a different possible combination of true (T) and false (F) for the inputs. The final column shows the result of the logical operation being tested. This helps us see patterns and understand how logical ideas connect together.