A tabular device to obtain the truth value of a compound statement or to check the validity of a simple or compound statement is called a truth table.
The number of horizontal lines (called rows) in a truth table depends upon the number of sub-statement involved in the problem. If the problem involves n simple statements then the number of rows is 2n, i.e.,
In the first n vertical lines (called columns) we take all the possible situations of truth or falsehood of the sub-statements and in the later columns we indicate the truth values of the compound statements. The number of columns in a truth table depends upon the problem and there is no general rule for this.