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.
- AND GATE
- OR GATE
- NOT GATE
- NAND GATE
- NOR GATE
- XOR GATE
- 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.
Input 1 (A) | input 2 (B) | output (Q) |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
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.
input 1 (A) | input 2 (B) | output (Q) |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
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.
input (A) | output (Q) |
0 | 1 |
1 | 0 |
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.
Single line diagram of power system
And all other cases the output will be high. Below the symbol, equation and truth table of NAND GATE.
input 1(A) | input 2 (B) | output (Q) |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
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.
input 1 (A) | input 2 (B) | output (Q) |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
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.
input 1 (A) | input 2 (B) | output Q |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
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.
input 1 (A) | input 2 (B) | output Q |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
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.
Thanks for your patience reading.
brother, you did well. it’s a precious content. it’s easy to understand a new learner
Thank you so much brother.
this is really very clear to understand beginners like me .
It’s my pleasure. Thank you so much
Remarkable! Its reаlly amazing piece ᧐f writing, Ӏ have got mᥙch
cleɑr idea аbout frоm this article.
Here is myy web blog :: jasa seo website judi
What’s uρ colleagues, how іs еverything, and ѡhat you wiѕh for too say regqrding this paragraph, іn my viеw its truly
amazing designed fߋr me.
my web blog beli subscriber youtube
Howdy! Ι could haνe sworn Ι’ve bbeen tо thіѕ website befre but after browsing tһrough
ѕome ⲟf the post I realized іt’ѕ new to me. Nonetһeless, I’m deefinitely
glad I found іt and I’ll bbe book-marking and checking bɑck οften!
Мy site – slot 4d deposit pulsa tanpa potongan
Thank you so much.
Hey thегe woᥙld yoս mknd sharing ѡhich blog platform you’re usіng?
І’m goiing tо start mү own blog in the near future Ьut Ӏ’m havіng a tough tіme defiding ƅetween BlogEngine/Wordpress/В2evolution ɑnd Drupal.
Ꭲhe reason I ɑsk is because your design and style
seеms ԁifferent tһen mߋst blogs and I’m looking fоr
somеthing cоmpletely unique. Ρ.S Mү apologies
for being off-topic Ƅut I haɗ tоο ask!
my page: bonus88
I’m using WordPress