A truth table lists all possible combinations of input binary variables and the corresponding outputs of a logic system. The logic system output can be found from the logic expression, often referred to as the Boolean expression, that relates the output with the inputs of that very logic system.
When the number of input binary variables is only one, then there are only two possible inputs, i.e. ‘0’ and ‘1’.
Truth table for two input binary variables
If the number of inputs is two, there can be four possible input combinations, i.e. 00, 01, 10 and 11. Figure 1(b) shows the truth table of the two-input logic system represented by Fig. 1(a).
The logic system of Fig. 1(a) is such that Y = 0 only when both A = 0 and B = 0. For all other possible input combinations, output Y = 1.
Truth table for three input binary variables
Similarly, for three input binary variables, the number of possible input combinations becomes eight, i.e. 000, 001, 010, 011, 100, 101, 110 and 111. This statement can be generalized to say that, if a logic circuit has n binary inputs, its truth table will have 2n possible input combinations, or in other words 2n rows.
Figure 2 shows the truth table of a three-input logic circuit, and it has 8 (= 23 ) rows.
Incidentally, this is the truth table of a three-input AND gate.
It may be mentioned here that the truth table of a three-input AND gate as given in Fig. 2 is drawn following the positive logic system.