Logic Gate
Logic Gate
Basic Logic Gates are the fundamental logic gates using which universal logic gates and other
logic gates are constructed.
They have the following properties-
NOT GATE:
The simplest possible gate is called an “inverter” or a NOT gate. It has just one input
and the output is its opposite: if the input is high (1), the output is low (0) and
viceversa. This could be represented by a simple lighting circuit with a push-to-break
switch: if the switch is pressed then the lamp will turn off.
Truth table for a NOT gate
Read as inversion of A Q A
gives Q
0 1
1 0
AND GATE:
An ANDgate is a circuit with two inputs and an output which is set to one only if both
the inputs are 1. This means that it will give ahigh output only if all of the inputs are
high. For example, in a simple lighting circuit with two switches in series the lamp
will light only if both switches are pressed.
A B Q
0 0 0
0 1 0
1 0 0
1 1 1
Read as A OR B gives Q.
A B Q
0 0 0
0 1 1
1 0 1
1 1 1
Timing Diagram-
NAND Gate
NOR Gate
1. NAND Gate-
A NAND Gate is constructed by connecting a NOT Gate at the output terminal of the AND
Gate.
The output of NAND gate is high (‘1’) if at least one of its inputs is low (‘0’).
The output of NAND gate is low (‘0’) if all of its inputs are high (‘1’).
Logic Symbol-
Truth Table-
Timing Diagram-
2. NOR Gate-
A NOR Gate is constructed by connecting a NOT Gate at the output terminal of the OR Gate.
The output of OR gate is high (‘1’) if all of its inputs are low (‘0’).
The output of OR gate is low (‘0’) if any of its inputs is high (‘1’).
Logic Symbol-
Truth Table-
The truth table for NOR Gate is as shown below-
A B Y=A+B
0 0 1
0 1 0
1 0 0
1 1 0
Timing Diagram-
Special Gates:
Ex-OR & Ex-NOR gates are called as special gates. Because, these two gates are special cases
of OR & NOR gates.
Ex-OR gate
The full form of Ex-OR gate is Exclusive-OR gate. Its function is same as that of OR gate except
for some cases, when the inputs having even number of ones.
The following table shows the truth table of 2-input Ex-OR gate.
A B Y = A⊕B
0 0 0
0 1 1
1 0 1
1 1 0
Here A, B are the inputs and Y is the output of two input Ex-OR gate. The truth table of Ex-OR gate
is same as that of OR gate for first three rows. The only modification is in the fourth row. That
means, the output YY is zero instead of one, when both the inputs are one, since the inputs having
even number of ones.
Therefore, the output of Ex-OR gate is ‘1’, when only one of the two inputs is ‘1’. And it is zero,
when both inputs are same.
Below figure shows the symbol of Ex-OR gate, which is having two inputs A, B and one output, Y.
Ex-OR gate operation is similar to that of OR gate, except for few combination ss of inputs. That’s
why the Ex-OR gate symbol is represented like that. The output of Ex-OR gate is ‘1’, when odd
number of ones present at the inputs. Hence, the output of Ex-OR gate is also called as an odd
function.
Ex-NOR gate
The full form of Ex-NOR gate is Exclusive-NOR gate. Its function is same as that of NOR gate
except for some cases, when the inputs having even number of ones.
The following table shows the truth table of 2-input Ex-NOR gate.
A B Y = A⊙B
0 0 1
0 1 0
1 0 0
1 1 1
Here A, B are the inputs and Y is the output. The truth table of Ex-NOR gate is same as that of
NOR gate for first three rows. The only modification is in the fourth row. That means, the output is
one instead of zero, when both the inputs are one.
Therefore, the output of Ex-NOR gate is ‘1’, when both inputs are same. And it is zero, when both
the inputs are different.
The following figure shows the symbol of Ex-NOR gate, which is having two inputs A, B and one
output, Y.
Ex-NOR gate operation is similar to that of NOR gate, except for few combination ss of inputs.
That’s why the Ex-NOR gate symbol is represented like that. The output of Ex-NOR gate is ‘1’,
when even number of ones present at the inputs. Hence, the output of Ex-NOR gate is also called
as an even function.
From the above truth tables of Ex-OR & Ex-NOR logic gates, we can easily notice that the Ex-NOR
operation is just the logical inversion of Ex-OR operation.
The following Truth Table compares the logical functions of the main 2-input logic
gates.
0 0 0 1 0 1 0 1
0 1 0 1 1 0 1 0
1 0 0 1 1 0 1 0
1 1 1 0 1 0 0 1