Code360 powered by Coding Ninjas X Code360 powered by Coding Ninjas X
Last Updated: Mar 27, 2024
Leveraging ChatGPT - GenAI as a Microsoft Data Expert
Prerita Agarwal
Data Specialist @
23 Jul, 2024 @ 01:30 PM


This blog will discuss logic gates and the different types of logic gates. But before learning about different types of logic gates, we should first look at what are logic gates and why logic gates were needed in the first place. 

Also Read - Shift Registers in Digital Electronics and Difference Between Jfet and Mosfet

What are logic gates?

Logic gates are used in computers to convert 1s and 0s from input wires. A logic gate receives inputs and then outputs a result based on the state of those inputs.

What is the use of logic gates?

So, we send information to computers via wires that represent 1s and 0s. Computers require a method to manipulate those 1s and 0s to ultimately do more complex operations, such as computing the 50th decmal digit of pi.


Now we need to look at some basic terminologies related to logic gates like boolean algebra, truth table, etc.

You can refer to this flowchart to get some idea of basic terminologies related to boolean algebra and logic gates.


Logic Gates are large digital devices that mainly use the Boolean function. Logic gates create a single binary output by performing logical operations on multiple binary inputs. A digital system comprises logic gates, which are electrical circuits. These may take two or more inputs but only produce one output.

The output of a logic gate is determined by the combination of inputs placed across it. To carry out logical operations, logic gates make use of Boolean algebra. Nearly every digital device we use daily has logic gates. In the architecture of modern phones, computers, tablets, and memory devices, logic gates are utilized.

Recommended Topic, Microinstruction in Computer Architecture

Types Of Logic Gates

There are seven different types of logic gates:

  1. AND Gate
  2. OR Gate
  3. NAND Gate
  4. NOR Gate
  5. NOT Gate
  6. XOR Gate
  7. XNOR Gate

We will be discussing about each of the logic gates in the following sections.

AND Gate

Truth Table

The AND gate is an electrical circuit that only outputs a high value (1) if its inputs are also high. The AND operation, i.e., A.B., is represented by a dot (.). Remember that this dot is occasionally deleted, as in AB.

OR Gate

Truth Table

An OR gate is a logic gate that performs a logical OR operation. The logical OR operation gives a high output if one or both of the gate's inputs are high (1). (1). The outcome is a low output if neither of the inputs is high (0). An OR gate can only have one output probe, similar to how an AND gate may have an infinite number of input probes.


Truth Table

This is a NOT-AND gate, a combination of an AND gate and a NOT gate. If any of the inputs is low, the outputs of all NAND gates are high. An AND gate with a little circle on the output is the symbol. The little circle represents inversion.

NOR Gate

Truth Table

This is a NOT-OR gate, a combination of an OR gate and a NOT gate. If any of the inputs is high, the outputs of all NOR gates are low.

An OR gate with a little circle on the output is the symbol. The little circle represents inversion.

NOT Gate

Truth Table


The NOT gate is a kind of electrical circuit that outputs an inverted version of the input. An inverter is another name for it. The inverted output is NOT A if the input variable is A. As shown at the outputs, this is also displayed as A', or A with a bar over the top. The illustrations below demonstrate two different methods to arrange the NAND logic gate to form a NOT gate. In the same manner, it may be done using NOR logic gates.

XOR Gate

Truth Table

In an XOR gate, the output of a two-input XOR gate achieves state 1 if just the input is added.

The Boolean expression of the XOR gate is




Truth Table

The XNOR gate is the XOR gate's opposite. The output level is high only when both of the XNOR gate's inputs are the same, either 0 or 1.

The Boolean expression of the XNOR gate is

Read about Instruction Format in Computer Architecture and what is middleware

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job


  1. What are the applications of Logic Gates?
    The applications of logic gates are many, but they are mostly determined by their mode of operation or truth table. Basic logic gates may be found in a safety thermostat, a push-button lock, an automated watering system, a light-activated burglar alarm, and a variety of other electronic devices. 
    If the processes are advanced, one of the key advantages is that simple logic gates may be employed in various combinations. Furthermore, the number of gates employed in a single device is unlimited. However, it may be limited due to the device's physical limitations. A logic gate area unit array may be found in digital integrated circuits (I.C.s).
  2. What is DeMorgan’s Law?
    De Morgan's Law states that the complements of two sets are the complements of their complements and that the complements of two sets are the complements of their complements. De Morgan, a talented mathematician, was the inspiration for them. (A B)' = A'B'is the formula for this law. The set theory uses complements to link the intersection and union of sets.
  3. What is an Adder?
    In electronics, an adder is a digital logic circuit often used to add integers. Adders are used in many computers and other kinds of processors to calculate addresses and associated actions and construct table indices in the ALU and other portions of the CPU. Many number representations, such as excess-3 or binary coded decimal, may be formed using them. 

Key Takeaways

This article briefly discussed different types of gates. 

I hope that you must have gained some insight into this topic of Logic gates and if you want to learn more then you can refer to this blog.

Learn about Spring Boot Architecture here.

Thank you for reading.

Topics covered
Types Of Logic Gates
AND Gate
OR Gate
NOR Gate
NOT Gate
XOR Gate
Key Takeaways