A truth table is a mathematical table used in logic to determine the output of a compound statement for every possible combination of input values.
Truth table for the logical statement
| F | F | F | F | F |
| F | F | T | F | T |
| F | T | F | F | F |
| F | T | T | F | T |
| T | F | F | F | F |
| T | F | T | F | T |
| T | T | F | T | T |
| T | T | T | T | T |
Notice how occasionally in-between statements are included to help with computing the final outputs.
To construct a truth table the inputs can be written in terms of counting in binary with true representing a 1 and false representing a 0. For example in the previous truth table we start with