LOGIC GATES
Logic gates are the fundamental components of all digital circuits and systems. In digital
electronics, there are seven main types of logic gates used to perform various logical
operations. A logic gate is basically an electronic circuit designed by using components like
diodes, transistors, resistors, capacitors, etc., and capable of performing logical operations.
What is a Logic Gate?
A logic gate is an electronic circuit designed by using electronic components like diodes,
transistors, resistors, and more. As the name implies, a logic gate is designed to perform
logical operations in digital systems like computers, communication systems, etc.
Therefore, we can say that the building blocks of a digital circuit are logic
gates, which execute numerous logical operations that are required by any
digital circuit. A logic gate can take two or more inputs but only produce
one output. The output of a logic gate depends on the combination of inputs
and the logical operation that the logic gate performs.
Logic gates use Boolean algebra to execute logical processes. Logic gates are found in
nearly every digital gadget we use on a regular basis. Logic gates are used in the
architecture of our telephones, laptops, tablets, and memory devices.
Types of Logic Gates
A logic gate is a digital gate that allows data to be manipulated. Logic gates, use logic to
determine whether or not to pass a signal. Logic gates, on the other hand, govern the flow
of information based on a set of rules.
The logic gates can be classified into the following major types:
1. Basic Logic Gates
1. AND Gate
2. OR Gate
3. NOT Gate
2. Universal Logic Gates
In digital electronics, the following two logic gates are considered as universal logic
gates:
1. NOR Gate
2. NAND Gate
3. Derived Logic Gates
1. XOR Gate
2. XNOR Gate
1)AND Gate
In digital electronics, the AND gate is one of the basic logic gate that performs the logical
multiplication of inputs applied to it. It generates a high or logic 1 output, only when all the
inputs applied to it are high or logic 1. Otherwise, the output of the AND gate is low or logic 0.
Properties of AND Gate:
The following are two main properties of the AND gate:
• AND gate can accept two or more than two input values at a time.
• When all of the inputs are logic 1, the output of this gate is logic 1.
The operation of an AND gate is described by a mathematical expression, which is
called the Boolean expression of the AND gate.
For two-input AND gate, the Boolean expression is given by,
𝑍=𝐴.𝐵
Where, A and B are inputs to the AND gate, while Z denotes the output of the AND gate.
We can extend this expression to any number of input variables, such as,
𝑍=𝐴.𝐵.𝐶𝐷 .
Truth Table of AND Gate:
Input Output
A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1
Symbol of AND Gate:
2)OR Gate
In digital electronics, there is a type of basic logic gate which produces a low or logic 0 output
only when its all inputs are low or logic 0. For all other input combinations, the output of the OR
gate is high or logic 1. This logic gate is termed as OR gate. An OR gate can be designed to have
two or more inputs but only one output. The primary function of the OR gate is to perform the
logical sum operation.
Properties of OR Gate:
• It can have two or more input lines at a time.
• When all of the inputs to the OR gate are low or logic 0, the output of it is low or logic
0.
The boolean expression for a two input OR gate is given by,
Z=A+B
Here, A, B, and C are inputs and Z is the output variables
Truth Table of OR Gate:
Input Output
A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1
Symbol of OR Gate:
3)NOT Gate
In digital electronics, the NOT gate is another basic logic gate used to
perform compliment of an input signal applied to it. It takes only one input
and one output. The output of the NOT gate is complement of the input
applied to it. Therefore, if we apply a low or logic 0 output to the NOT gate is
gives a high or logic 1 output and vice-versa. The NOT gate is also known as
inverter, as it performs the inversion operation.
Properties of NOT Gate:
• The output of a NOT gate is complement or inverse of the input applied to it.
• NOT gate gives only one output.
The logical operation of the NOT gate is described by its boolean expression,
Truth Table of OR Gate:
Input Output
A NOT A
0 1
1 0
Symbol of NOT Gate
4)NOR Gate
The NOR gate is a type of universal logic gate that can take two or more inputs but one
output. It is basically a combination of two basic logic gates i.e., OR gate and NOT
gate.
Properties of NOR Gate:
• A NOR gate can have two or more inputs and gives an output.
• A NOR gate gives a high or logic 1 output only when its all inputs are low or logic 0.
Truth Table of NOR Gate:
Input Output
A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0
5)NAND Gate
In digital electronics, the NAND gate is another type of universal logic gate used to perform
logical operations. The NAND gate performs the inverted operation of the AND gate. Similar to
NOR gate, the NAND gate can also have two or more input lines but only one output line.
The NAND gate is also represented as a combination of two basic logic gates
namely, AND gate and NOT gate. Hence, it can be expressed as
NAND Gate = AND Gate + NOT Gate
Properties of NAND Gate:
• NAND gate can take two or more inputs at a time and produces one output based on the
combination of inputs applied.
• NAND gate produces a low or logic 0 output only when its all inputs are high or logic 1
Here is the boolean expression of a two input NAND gate.
Truth Table of NAND Gate:
Input Output
A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0
Symbol of NAND Gate:
6)XOR Gate
In digital electronics, there is a specially designed logic gate named, XOR gate, which is used in
digital circuits to perform modulo sum. It is also referred to as Exclusive OR gate or Ex-OR gate.
The XOR gate can take only two inputs at a time and give an output. The output of the XOR gate is
high or logic 1 only when its two inputs are dissimilar.
Properties of XOR Gate:
• It can accept only two inputs at a time. There is nothing like a three or more input XOR
gate.
• The output of the XOR gate is logic 1 or high, when its inputs are dissimilar.
The following is the boolean expression for the output of the XOR gate:
Here, Z is the output variable, and A and B are the input variables.
This expression can also be written as follows:
X = A’B + AB’
Truth Table of XOR Gate:
Input Output
A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0
Symbol of XOR Gate:
7)XNOR Gate
The XNOR gate is another type of special purpose logic gate used to implement exclusive
operation in digital circuits. It is used to implement the Exclusive NOR operation in
digital circuits. It is also called the Ex-NOR or Exclusive NOR gate. It is a combination of
two logic gates namely, XOR gate and NOT gate. Thus, it can be expressed as:
Properties of XNOR Gate:
• XNOR gate takes only two inputs and produces one output.
• The output of the XNOR gate is high or logic 1 only when it has similar inputs.
Here is the boolean expression of the XNOR gate:
Truth Table of XNOR Gate:
Input Output
A B A XNOR B
0 0 1
0 1 0
1 0 0
1 1 1
Symbol of XNOR Gate:
Applications of Logic Gates
• Computers
• Microprocessors
• Microcontrollers
• Digital and smart watches
• Smartphones, etc.