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 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 an interesting history in logic. Researchers think C.S. Peirce might have been the first to create a truth table in 1883. Later, in 1997, John Shosky found old notes from a lecture by Bertrand Russell from 1912. These notes showed that ideas about truth tables were developing earlier than many people thought.
Applications
Truth tables are useful tools in logic. They show that different logical expressions mean the same thing by listing all possible combinations of true and false values.
Truth tables are also important in digital electronics. They help explain how basic operations, like adding binary numbers, work. 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
People have different ways to fill in the columns on the left side of a truth table, but the logic stays the same. 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 switch between T (for true) and F (for false). Then you 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 it lists all the ways to mix T’s and F’s step by step, ending with all F’s. Both methods help make 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, there are 2n possible ways to combine 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. They show how outputs change with different values of variables. For example, in an XOR gate, a value G can decide 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. They show how different logical statements work. They help us know if a statement is true or false, based on its parts.
For example, if we have two statements, A and B, a truth table shows what happens when we connect them with words like "and," "or," or "if...then."
Each column in a truth table shows a different mix of true (T) and false (F) for the inputs. The last column shows the result of the logical test. This helps us see patterns and understand how logical ideas fit together.