Logic Gates And How They Work


Logic gates are the essential constructing blocks of digital electronics. These are the elements that we use for “doing stuff” with the 1s and 0s. You may mix them to create different constructing blocks like flip-flops, adders, and extra.
The essential logic gates are AND, NAND, OR, NOR, XOR, XNOR, and NOT.
AND gate
The AND gate takes two (or extra) inputs and provides out a 1 (HIGH/true) if all of the inputs are 1. In any other case, it provides out a 0 (LOW/false).
The reality desk is beneath, however all you actually need to recollect is that the AND gate wants a 1 on enter A and enter B to provide out 1.

Enter A | Enter B | Output Y |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
If you wish to use it in a circuit, the IC 4081 accommodates 4 AND gates.
NOT gate/Inverter
The best logic gate of all is the NOT gate. It takes one bit as enter (A). And it provides as an output (Y) what’s NOT on the enter. So if there’s a 1 on the enter, its output is 0. And if there may be 0 on the enter, its output is 1. It’s additionally known as an inverter.

If you wish to use a NOT gate in your circuit, you possibly can for instance use the IC 4572 or IC 40106.
OR gate
The OR gate takes two (or extra) inputs and provides out a 1 if any of the inputs are 1. In any other case, it provides out a 0.
The reality desk is beneath, however all you actually need to recollect is that the OR gate wants a 1 on enter A or enter B to provide out 1.

Enter A | Enter B | Output Y |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
If you wish to use it in a circuit, the IC 4071 accommodates 4 OR gates.
NAND gate
The NAND (or NOT AND) gate operates within the reverse method of the AND gate. It’s like if an AND gate had a NOT gate on its output:

You’ll discover the reality desk beneath. However all it is advisable to bear in mind is that the one time the output of a NAND gate is 0 is when each the inputs are 1.

Enter A | Enter B | Output Y |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
If you wish to use NAND gates in a circuit, the CMOS IC 4011 accommodates 4 NAND gates.
NOR gate
The NOR (or NOT OR) gate operates within the reverse method of the OR gate. It’s as if an OR gate had a NOT gate on its output.

You’ll discover the reality desk beneath. However all it is advisable to bear in mind is that the one time the output of a NOR gate is 1 is when each the inputs are 0.

Enter A | Enter B | Output Y |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
If you wish to use NOR gates in a circuit, the IC 4001 accommodates 4 NOR gates.
XOR gate

The XOR (or Unique OR) gate outputs 1 if considered one of its two inputs is 1 – however not each. It’s also possible to have a look at it on this method – if the 2 inputs are totally different from one another, the output is true.
Enter A | Enter B | Output Y |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
If you wish to use XOR gates in a circuit, the IC 4070 accommodates 4 XOR gates.
XNOR gate

The XNOR (or Unique NOT OR) gate works like an XOR gate with an inverter on the output. One other method to have a look at it’s to note that the output turns into 1 if its two inputs are equal – both two 1s or two 0s.
Enter A | Enter B | Output Y |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
If you wish to use XNOR gates in a circuit, you’ll discover 4 of them within the IC 4077.
Utilizing Logic Gates in Circuits
A logic gate might be constructed with transistors and often comes as an Built-in Circuit (IC).
There are two traditional IC collection that include loads of the identical features; the 7400-series and the 4000-series.
The 7400-series is the oldest collection. The 4000-series was launched as a lower-power and extra versatile choice to the 7400. However at this time, a number of households of the 7400-series exist, some with comparable properties because the 4000-series.
Take a look at my checklist of frequent 4000 collection IC with pinouts, explanations, and instance circuits for more information.
Full checklist of ICs within the 4000-series (Wikipedia)
Full checklist of ICs within the 7400-series (Wikipedia)