A Logic gate is a kind of the basic building block of a digital circuit having two inputs and one output. The input and output relationship is based on a certain logic. These gates are implemented using electronic switches such as diodes, transistors. But, in practice, the basic logic gates are built using CMOS technology, MOSFET(Metal Oxide Semiconductor FET), FETS. Logic gates are used in microcontrollers, microprocessors, electronic and electrical project circuits, and embedded system applications. The basic logic gates are categorized into seven types as AND, OR, XOR, NAND, NOR, XNOR, and NOT.
These are the important digital devices, mainly based on the Boolean function. Logic gates are used to carry out the logical operations on single or multiple binary inputs and result in one binary output. In simple words, logic gates are the electronic circuits in a digital system.
There are various basic logic gates used to perform operations in digital systems. The common ones are given below.
OR Gate
AND Gate
NOT Gate
XOR Gate
Also, these gates can be found in a combination of one or two. Therefore we get other gates like NAND, NOR, EXOR, and EXNOR Gates.
OR Gate
The OR gate output attains the state 1 if either one or more inputs attain the state 1.
The representation of an OR gate can be given by,
[Image will be Uploaded Soon]
Boolean expression of OR gate can be given by,
Y = A + B,
which reads as Y equals A ‘OR’ B.
The truth table of the two-input OR basic Gate can be given as follows.
AND Gate
In an AND gate, the output attains the state 1 if and only if all the inputs are in the state 1.
[Image will be Uploaded Soon]
Boolean expression of AND Gate can be given by,
Y = A . B
The truth table of the two-input AND basic Gate can be given as follows.
NOT Gate
The output in a NOT Gate attains the state 1 if and only if the input does not attain the state 1.
[Image will be Uploaded Soon]
Boolean expression of a NOT gate is given below.
Y = \[\bar{A}\]
Which reads as Y equals NOT A.
The truth table of the NOT gate can be given as follows.
When connected in various combinations, three of the gates (OR, AND, and NOT) give us the basic logic gates like NAND, NOR gates, which are the universal building blocks of the digital circuits.
NAND Gate
The NAND Gate is a combination of AND and NOT Gate.
[Image will be Uploaded Soon]
Boolean expression of a NAND gate is given below.
Y = \[\bar{A}\] . B
The NAND gate truth table can be given as follows.
NOR Gate
This is the combination of both OR and NOT gates.
Boolean expression of the NOR gate is given as,
Y = A ∓ B
The truth table of the NOR gate can be given as follows.
Exclusive-OR Gate
This is also known as an XOR Gate. In this, the output of a two-input XOR gate attains state 1 if one adds, only input attains the state 1.
[Image will be Uploaded Soon]
Boolean expression of the XOR Gate is given below.
\[\bar{A}\]B + \[\bar{A}\]B or Y = A ⊕ B
The truth table of the XOR gate can be given as follows.
Exclusive-NOR Gate
This is also known as an XNOR gate. Here, the output is in state 1 when both of its inputs are the same, i.e., both 0 or both 1.
[Image will be Uploaded Soon]
Boolean expression of the XNOR Gate is given as follows.
Y = A . B + \[\bar{A}\]B + \[\bar{A}\]B + \[\bar{A}\]B or Y = A \[\bar{\bigoplus}\] B
The truth table of the XNOR gate can be given as follows.
Application of logic gates are different types, but they are mainly based upon their operations mode or their truth table. Often, the basic logic gates are circuits like the push-button lock, safety thermostat, light-activated burglar alarm, automatic watering system, and many other electronic devices.
One of the significant benefits is that the basic logic gates can be used in a mixture of various combinations if the operations are advanced. On the other side, there is no limit to the number of gates used in a single device. It can be restricted, however, due to the given physical space in the device. In digital integrated circuits (ICs), we will find an array of the logic gate area unit.
In addition to these, there are more countable application of logic gates in daily life.
First De Morgan’s theorem – It states the NAND gate is equivalent to a bubbled OR gate.
The De morgan’s theorem formula can be given by,
\[\bar{A}\] . B = \[\bar{A}\] + \[\bar{B}\]
Second De Morgan’s theorem – It states the NOR gate is equivalent to a bubbled AND gate.
The De morgan’s theorem formula can be given by,
A ∓ B = \[\bar{A}\] . \[\bar{B}\]
1. Explain the NAND and NOR Gates, with their Respective Truth Tables?
NAND Gate
The NAND Gate is formed with the combination of ‘AND’ and ‘NOT’ Gate.
[Image will be Uploaded Soon]
The Boolean expression of NAND Gate is given as below:
Y′ = A￣. B
A | B | Y′ = A￣. B | Y |
0 | 0 | 0 | 1 |
0 | 1 | 0 | 1 |
1 | 0 | 0 | 1 |
1 | 1 | 1 | 0 |
NOR Gate
NOR Gate can be formed by the combination of OR and NOT gates.
[Image will be Uploaded Soon]
Boolean expression of NOR Gate is given below.
Y′ = A￣+ B
The truth table of a NOR gate can be given as below.
A | B | Y′ = A￣+ B | Y |
0 | 0 | 0 | 1 |
0 | 1 | 1 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 1 | 0 |
2. Explain the XOR and XNOR Gates?
XOR Gate
The XOR Gate forms with a combination of NOT, AND, and OR gates.
The logic gate gives results output (i.e., 1) if either input A or B but not both are high (i.e., 1) is known to be an XOR gate or the exclusive OR Gate. It can be noted that if both XOR gate inputs are high, the output is low (i.e., 0).
[Image will be Uploaded Soon]
Boolean expression of the XOR gate can be given by,
Y = A ⊕ B
The truth table of the XOR gate can be given as follows.
A | B | Y |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Exclusive NOR Gate
The exclusive NOR gate is otherwise known as the XNOR gate. It is the combination of XOR and NOT gates.
[Image will be Uploaded Soon]
Boolean expression of an XNOR gate can be given by,
Y = A ⊙ = A￣B + AB