A truth table is a mathematical table used to determine if a compound statement is true or false. In a truth table, each statement is typically represented by a letter or variable, like p, q, or r, and each statement also has its own corresponding column in the truth table that lists all of the possible truth values.
Let’s take the statement, ‘It is raining outside.’ This statement, which we can represent with the variable p, is either true or false.
p = It is raining outside
If it is raining, then p is true. If it isn’t raining, then p is false.
The negation of a statement, called not p, is the statement that contradicts p and has the opposite truth value.
not p = It is not raining outside
If it is raining outside, then not p is false. If it isn’t raining outside, then not p is true.
Here is how both of these possibilities are represented in a truth table in which T represents true, and F represents false: