We live in a digital world. Understanding digital electronics is necessary to make the most of digitization. In this article, we will try to understand Logic gates which are the building blocks of digital electronics.
Suggested Videos
Continuous or Analogue Signals
If you look at amplifiers or oscillators, the input signal used is a continuous, time-varying current or voltage. These signals are Continuous or Analogue Signals. They look like:
Now, it is possible to have an input signal with discrete values of voltage. Or in simple words, an input signal which provides Level 0 or Level 1 voltage. These signals are Digital Signals; refer to the diagram below:
Binary numbers (0 and 1) are used to represent such signals. Only these two levels of voltage are used in digital electronics. Both input and output are either Level 0 or Level 1.
A classic example of digital signals: When you switch on a light in your house, the output value is Level 1 which turns the light ON. When you switch it off, the output value drops to Level 0, switching the light OFF.
Logic Gates process digital signals in a specific manner and are used in calculators, digital watches, etc. Letâ€™s understand them better.
Browse more Topics under Semiconductor Electronics Materials Devices And Simple Circuits
- Classification of Metals, Conductors and Semiconductors
- Intrinsic Semiconductor
- Extrinsic Semiconductor
- p-n Junction
- Special Purpose p-n Junction Diode
- Semiconductor Diode
- Junction Transistor â€“ Structure and Action
- Junction Transistor â€“ Circuit Configurations and Characteristics
- Junction Transistor as a Device
- Junction Transistor as a Feedback Amplifier and Transistor Oscillator
- Application of Junction Diode as a Rectifier
Logic Gates
For digital devices to function the way they do, a logic needs to be established between the input and output voltages. This is achieved by using a gate or a digital circuit that follows the logical relationship. Since the control the flow of information based on a certain logic, they are called logic gates.
Each logic gate is indicated by a symbol and has a truth table which displays all possible input-output combinations. In short, the truth tables help understand the behaviour of the logic gates. These gates are made using semiconductor devices. The five most commonly used logic gates are:
- NOT
- AND
- OR
- NAND
- NOR
Letâ€™s study each one of them in detail.
1.Â Â Â Â Â NOT gate
A simple gate with one input and one output, a NOT gate simply inverts the input signal. So, the output is â€˜0â€™ when the input is â€˜1â€™ and vice-versa. Due to this property, a NOT gate is also known as an inverter. Here is the commonly used symbol for a NOT gate:
And, the truth table for a NOT gate is as follows:
Input (A) | Output (Y) |
0 | 1 |
1 | 0 |
2.Â Â Â Â Â OR Gate
An OR gate has two or more inputs and one output. The logic of this gate is that the output would be 1 when at least one of the inputs is 1. Simply put, the output is high when any of the input is high. The commonly used symbol for an OR gate is as follows:
And, the truth table for an OR gate is as follows:
Input | Output | |
A | B | Y |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
3.Â Â Â Â Â AND gate
An AND gate also has two or more inputs and a single output. In this gate, the output is 1 when all the inputs are 1. In other words, the output is high when all the inputs are high. The most commonly used symbol for an AND gate is as follows:
And the truth table for the AND gate is as follows:
Input | Output | |
A | B | Y |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
4.Â Â Â Â Â NAND gate
A NAND gate is simply an AND gate followed by a NOT gate. Confused? Itâ€™s simple. The output is 1 only when all inputs are NOT 1. Or the output is high when all the inputs are NOT high and at least one of them is low. These are also called Universal gates since the earlier three gates can be realized, y using the NAND gate. The commonly used symbol for a NAND gate is as follows:
And, the truth table for a NAND gate is as follows:
Input | Output | |
A | B | Y |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
As can be seen above, it is the opposite of an AND gate â€“ (NOT+AND = NAND).
5.Â Â Â Â Â NOR gate
A NOR gate is simply an OR gate followed by a NOT gate. The output is 1 only when all inputs are 0. Or the output is high when all the inputs are low. These are also called Universal gates since the earlier three gates can be realized by using the NOR gate. The commonly used symbol for a NOR gate is as follows:
And the truth table for a NOR gate is as follows:
Input | Output | |
A | B | Y |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
As can be seen above, it is the opposite of an OR gate â€“ (NOT+OR = NOR).
Solved Examples for You
Question: Write the truth table for the NAND gate connected as given below:
Solution: A NAND gate has two or more inputs and one output. In the image above, the inputs are connected together. This means that when â€˜Aâ€™ is low, all inputs for the NAND gate will be low and vice-versa. Now, the original NAND truth table is as follows:
Input | Output | |
A | B | Y |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Since, inputs A and B are connected together, when A=0, both A, and B are 0. Also, when A=1, both A and B are 1. Hence the truth table will be as follows:
Input (A) | Output (Y) |
0 | 1 |
1 | 0 |
This is exactly the truth table for a NOT gate. Hence, a NAND gate connected as shown in the example above works like a NOT gate.
Question:
Write the truth table for circuit given in the figure below consisting of NOR gates and identify the logic operation (OR, AND, NOT) which this circuit is performing.
Solution: The above image is a combination of two NOR gates. The first gate functions like a normal NOR gate following the below mentioned truth table:
Input | Output | |
A | B | Y |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
In the second gate, the A and B inputs are connected together. So, when A=0, both A and B are 0 and vice-versa. Hence the truth table for this gate will be as follows:
Input (A) | Output (Y) |
0 | 1 |
1 | 0 |
This is the truth table for a NOT gate. Combining the two together, we get a NOR gate followed by a NOT gate. So, the truth table for the example cited above becomes:
Input | Output | |
A | B | Y |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
This is the truth table for an OR gate. Hence, the diagram above uses NOR gate to function like an OR gate.
Leave a Reply