Truth table is a mathematical table used to describe all possible logic states or logic levels of logic circuit inputs and corresponding output. It may be single input logic circuit, two inputs, three inputs and even more.
This is a truth table for NOT operation. It has only one input and only two input states are possible here. A represents inputs states and X represents output states.
Similarly this is a truth table for two input AND operation. It has four possible logic states and truth table includes all of those. Like NOT operation X represents output states.
Three and four input truth tables are given below:
There is an interesting point to note, we get two table entries for one input, four table entries for two inputs, eight entries for three inputs and so on. Input combinations are equal to 2N, where N is the number of inputs. Writing all possible combinations is very easy, you can follow binary counting sequence and output depends on your logic operation.