 # Logic gates (AND, OR, NOT, NAND, NOR, XOR, XNOR)

Logic gates are the most important elements of digital electronics. All the digital devices are used in the present days, consist of a lots of logic gates. Our smartphone, laptop and even smart watches are consist of these logic gates. Logic gates act as logical operator (e.g and, or). I today would like to discuss about different types of logic gates.

## Definition of Logic gates

A logic gate is a device that acts as a building block for digital circuit. They perform basic logical functions that are fundamental to digital electronics. Logic gate usually take one or two inputs and give an logical output. You can think logic gate as an electronics circuit. For example, let you want your bedroom light automatically on if it’s night and someone exists in your room. That’s mean if two conditions (it’s night and someone is in your room) are met, the light then will glow. If one or none of these conditions aren’t met, the light will not glow.

In such functions, logic gates are used. Though it’s a simple example for your easy understanding. Logic gate works in very difficult and large circuit. Logic gates take input in the form of binary number 0 or 1. There 0 represents false and 1 represents truth. And it give a logical output 0 or 1. The binary 0 and 1 actually mean no voltage and voltage respectively. It also mean low (0)and high (1) too.

## Types of Logic Gates

Basically there are seven types of logic gates. These are listed below.

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

## 1. AND GATE

AND gate acts like AND operator. It has two input terminals and an output terminal. If it’s both input terminal are high, means 1, then it’s output terminal will be high. On the other hand, if it’s one or both terminal are low, means 0, then it’s output will be 0. See the truth table for the AND gate below.

## 2. OR GATE

OR gate acts like or operator. Those who have a basic knowledge on programming language, can easily understand the OR gate. It also has two input and an out terminal like AND gate. If either one or both inputs of OR gate is/are high, then it’s output will be high (1). It’s output will be low(0), only when both inputs are low(0). See the truth table for OR GATE below.

## 3. NOT GATE

NOT GATE is like inverter. It has one input and one output terminal. If it’s input is high (1), then output is low(0) and vice versa. See the truth table for NOT GATE below.

## 4. NAND GATE

If a NOT GATE, by other means, an inverter’s input terminal is connected with an AND GATE’s output terminal, then it’s called a NAND GATE. It acts absolutely opposite of AND gate. When both inputs of a NAND gate will be high, then it’s output will be low.

And all other cases the output will be high. Below the symbol, equation and truth table of NAND GATE.

## 5. NOR GATE

NOR GATE is totally opposite of OR gate. If an inverter’s (NOT gate) input is given by an OR GATE’s output then it’s called a NOR gate. When both inputs of NOR gate are low(0), only then output will be high (1). In other cases output will be low (0). See the symbol and truth table of NOR gate.

## 6. X-OR gate

X-OR or exclusive OR gate is something different from OR gate. If both inputs of this logic gate are same (either 0 or 1), then output will be low (0). If one output is low and another one is high, then output will be high (1). See the symbol, boolean expression and truth table of exclusive OR gate below.

## 7. X-NOR gate.

X-NOR or exclusive NOR gate is something different from NOR gate. If both inputs of this logic gate are same (either 0 or 1), then output will be high (1) If one output is low and another one is high, then output will be low (0). See the symbol, boolean expression and truth table of exclusive nor gate below.

That’s all about today’s discussion on logic gates. Please feel free to do any questions if you find difficulty to understand any of the part of this post. You can also give suggestions and rectify me, if you find any wrong information here.

Now, give answer to some questions below based on the topic, Logic gates. It will help you to boost up your knowledge on this topic.

1.
How many types of logic gates you know after reading this post?
2.
If the both inputs of an AND gate are high, then output will be....
3.
Which logic gate has one input?
4.
If both inputs of NAND gate are high, then output will be...
5.
If input is high, then output will be low and vice-versa. In which gate?
6.
If both inputs are high, then output will be low, in which gate/gates?
7.
If both inputs are same, then output will be low, in which gate?
8.
If both inputs are same, then output will be high, in which gate?
9.
What is the boolean expression of AND gate?
10.
What is the boolean expression of OR gate?

1. RASEL HOSSAIN says:
1. admin says: