Menu

Truth tables

Rows in a Truth Table

A truth table must list every possible combination of input values, so the number of rows depends on how many inputs the expression has.

For n inputs there are 2 to the power of n possible combinations, so each extra input doubles the number of rows. Adding an input splits every row you already had into two: one where the new input is 0, and one where it is 1.

InputsRows neededCombinations
120, 1
2400, 01, 10, 11
38000, 001, 010, 011, 100, 101, 110, 111

Three inputs, eight rows

A three-input truth table therefore has eight rows, not six. With only six rows you have left two combinations out, so the table is incomplete and cannot show what the expression does in those cases.

The combinations in the table are listed in binary counting order, which is a common way to fill the input columns. Counting upwards like this makes the table easy to check, because you can see straight away when a combination has been skipped.

For example, a bike alarm might take three inputs: wheel moving (W), alarm armed (A) and key inserted (K). With three inputs you need eight rows, and every row gets its own set of values for W, A and K before you work out the output for that row.

Any order is acceptable

The rows do not have to follow binary order. Any order works as long as every possible combination appears exactly once and none is repeated, so shuffling the eight rows of a three-input table still gives a correct table.

Practise this