Logic Gates 101: From AND to XNOR
—Everything You Need to Know
Logic gates:
The most important part of digital electronic circuits is the logic gate. It is
a mechanical or electronic device that converts one or more binary inputs
(0 and 1) into a binary output by carrying out a simple logical operation.
AND Gate:
Electronic circuits like the AND gate only produce a high output (1) when
all their inputs are high. The AND operation is denoted by a dot (.)
|
B |
F=A.B |
|
|
0 |
0 |
0 |
|
0 |
1 |
0 |
|
1 |
0 |
0 |
|
1 |
1 |
1 |
OR Gate:
An electrical circuit known as an OR gate produces a high output (1) when
one or more of its inputs are high. The OR operation is shown by a plus
sign (+).
|
A |
B |
F=A+B |
|
0 |
0 |
0 |
|
0 |
1 |
1 |
|
1 |
0 |
1 |
|
1 |
1 |
1 |
The output of an electrical circuit called a NOT gate is an inverted replica
of the input. It is also known as inverter.
|
A |
~(A) |
|
0 |
1 |
|
1 |
0 |
Diagram:
NAND Gate:
This type of gate is a NOT-AND gate, which is equivalent to an AND gate
then a NOT gate. If any of the inputs are low, the output of the NAND gate
is high. An AND gate with a tiny circle on the output serves as the sign. The
little circle is a representation of inversion.
|
A |
B |
~(A.B) |
|
0 |
0 |
1 |
|
0 |
1 |
1 |
|
1 |
0 |
1 |
|
1 |
1 |
0 |
NOR Gate:
This is an OR gate followed by a NOT gate, or a NOT-OR gate. If any of
the inputs are high, the output of the NOR gate is low. An OR gate with a
tiny circle on the output serves as the sign. The little circle is a representation
of inversion.
|
A |
B |
~(A+B) |
|
0 |
0 |
1 |
|
0 |
1 |
0 |
|
1 |
0 |
0 |
|
1 |
1 |
0 |
XOR Gate:
The 'Exclusive-OR' gate is a circuit that produces a high output if an odd
number of inputs are high. To indicate the XOR operation, a plus
sign ("⊕") is enclosed in a circle.
|
B |
A⊕B |
|
|
0 |
0 |
0 |
|
0 |
1 |
1 |
|
1 |
0 |
1 |
|
1 |
1 |
0 |
The 'Exclusive-OR' gate is a circuit that produces a high output if an even
number of inputs are high. To indicate the XNOR operation, a plus sign
("⊕") is enclosed in a circle with complement.

0 Comments