Now coming to the basic definition of truth table, it is the possible combinations of input binary variables and the corresponding outputs for each of the inputs. We have already discussed about the Boolean algebra in different article of this website. For example if there is only one input there are maximum two possible inputs which are 0&1. Now similarly if the number of input binary is 2 then there are four possible inputs which are 00, 01, 10 & 11. Again if the number of input binary variable is 3, then the number of total possible inputs is eight and they are 000, 001, 010, 011, 100, 101, 110 and 111. So we can get a general formula to calculate the total number of input combinations, that is if a logic circuit has n number of binary inputs then the total number of maximum possible inputs are 2n.
Now coming to the construction of truth table, a truth table is composed of one column for each input variable, and finally a column for all the possible results of the binary operation. So each row of a truth table consists of a possible combination of input variables and a possible output for that particular input. Now if we look through some truth tables of different logic gates then it will be easier for us to understand.
Two input OR gate truth table
The above example is of a two input or gate, here the possible input combinations are 22 = 4 and the operation can be understood very easily if one is familiar with the OR gate.
Three input AND gate truth table