A logic gate is a basic switching circuit used in digital circuits that determines when an input pulse can pass through to the output. It generates a single output from one or more inputs.
Explanation/Uses : Any digital computation process consists in performing a sequence of arithmetical operations on the data of the problem. At each stage in the computation, the nature of the operation to be performed is decided partly by the pre-determined program and partly by the outcome of earlier stages in the process. We therefore need switches with multiple inputs to perform logical operations, i.e., the outputs of these switches are determined in specified ways by the condition (binary state) of their inputs. These arrangements are known as logic gates, and mostly they are extension of a simple transistor switch.
(1) Boolean expression : An equation expressing a logical compound statement in Boolean algebra is called a Boolean expression. A Boolean expression for a logic gate expresses the relation between input(s) and output of a logic gate.
(2) Truth table : The table which shows the truth values of a Boolean expression for a logic gate for all possible combinations of its inputs is called the truth table of logic gate.
The truth table contains one row for each input combination. Since a logical variable can assume only two possible values, 0 and 1, there are 2N combinations of N inputs so that the table has 2N rows.
[Note : Boolean algebra is a form of symbolic logic developed in 1847 by George Boole (1815-64) British mathematician.]