Logic Gates: Complete Guide on All LogicGates

Logic Gates
Logic Gates

Logic Gates: Introduction to Logic Gates

 

Logic gates are the basic blocks for digital circuits. Basically, there are 7 logic gates, namely AND, OR, NOT, NAND, NOR, XOR AND XNOR. A logic gate commonly consists of two input terminals and one output terminal (except for NOT gate/ inverter). At any given instant, there can be two inputs given to a logic gate i.e a combination of either ‘1’(Active high) or ‘0’(Active low).

 

Truth Table : This table shows the exact operation of the logic gate with all possible combination of inputs and their respective outputs.

Logic Gates: NOT Gate

 

NOT Gate
NOT Gate

Boolean Expression : F =  I̅

There is only one input to the NOT Gate. It is also Inverter.

Case 1 : If the switch is open,The LED will glow.

Case 2 : If the switch is close,

The LED will remain OFF. (Current always prefers a low resistance path).

 

Truth Table:

Input Output
1 0
0 1

 

Tip : This is the only single input gate out of all others. The output is the opposite of the input.

Logic Gates: AND GATE

 

AND GATE
AND GATE

Boolean Expression : Y= A.B

Consider Ckt in the above diagram, let switch A be the Input 1 and Switch B be the input 2 and the output  will be the glowing of LED if it glows it is one. The input will be ‘0’ if the switch is open and ‘1’ if the switch is closed.
The power source is ON continuously,

Case 1 : Both the switches are open.

In this case, The LED will remain off.

Case 2 : Switch A is closed and Switch B is open.

In this case again, the LED will stay off.

Case 3 : Switch A is open and Switch B is Close.

In this case again, the LED still remains off.

Case 4 : Both the switches are close.

In this case, the LED will glow.

This is the truth Table for AND Gate considering the above four cases.

Truth Table:

A B Y
0 0 0
0 1 0
1 0 0
1 1 1

 

Tip : You can remember the truth table as when Inputs A ‘AND’ B are high (1), the output is High (1).

Logic Gates: OR Gate

 

OR GATE
OR GATE

Consider Ckt in the above diagram, let switch A be the Input 1 and Switch B be the input 2 and the output  will be the glowing of LED if it glows it is one. The input will be ‘0’ if the switch is open and ‘1’ if the switch is closed.

The power source is ON continuously,

Case 1 : Both the switches are open.

In this case, The LED will remain off.

Case 2 : Switch A is close and Switch B is open.

In this case, the LED will turn ON.

Case 3 : Switch A is open and Switch B is close.

In this case again, the LED will again turn ON.

Case 4 : Both the switches are close.

In this case, the LED will turn ON.

Truth Table:

A B Y
0 0 0
0 1 1
1 0 1
1 1 1

 

Tip : To easily remember the OR gate truth table, the trick is either Input A ‘OR’ Input B has to be high (1), for the output to be high.

Logic Gates: NAND GATE

 

NAND Gate
NAND Gate

Consider Ckt in the above diagram, let switch A be the Input 1 and Switch B be the input 2 and the output  will be the glowing of LED if it glows it is one. The input will be ‘0’ if the switch is open and ‘1’ if the switch is closed.

The power source is ON continuously,

Case 1 : Both the switches are open.

In this case, The LED will remain ON.

Case 2 : Switch A is closed and Switch B is open.

In this case again, the LED will still remain ON.

Case 3 : Switch A is open and Switch B is Close.

In this case again, the LED is still ON..

Case 4 : Both the switches are close.

In this case, the LED will go OFF. (Current always follows a low resistance path).

This is the truth Table for NAND Gate considering the above four cases.

Truth Table:

A B Y
0 0 1
0 1 1
1 0 1
1 1 0

 

Tip : The operation of this gate is exactly reverse to that of an AND gate. It is like and inverter applied at the output of AND gate. Here, when both the inputs are high, the output is low.

Logic Gates: NOR Gate

 

NOR GATE
NOR GATE

Consider Ckt in the above diagram, let switch A be the Input 1 and Switch B be the input 2 and the output  will be the glowing of LED if it glows it is one. The input will be ‘0’ if the switch is open and ‘1’ if the switch is closed.

The power source is ON continuously,

Case 1 : Both the switches are open.

In this case, The LED will remain ON.

Case 2 : Switch A is closed and Switch B is open.

In this case again, the LED will still remain OFF.

Case 3 : Switch A is open and Switch B is Close.

In this case again, the LED is still OFF.

Case 4 : Both the switches are close.

In this case, the LED will go OFF. (Current always follows a low resistance path).

This is the truth Table for NOR Gate considering the above four cases

Truth Table:

A B Y
0 0 1
0 1 0
1 0 0
1 1 0

 

Tip : The operation of this gate is exactly reverse to that of an OR gate. It is like and inverter applied at the output of OR gate. Here, when both the inputs are low, the output is high.

Logic Gates: EX-OR Gate (Exclusive OR Gate)

 

EXOR GATE
EXOR GATE

Consider Ckt in the above diagram, let switch A be the Input 1 and Switch B be the input 2 and the output  will be the glowing of LED if it glows it is one. The inputs will be logic 0 & logic 1 as demonstrated.

The power source is ON continuously,

Case 1 : Both the switches are switched to logic 0.

In this case, The LED will remain OFF. (Current always follows a low resistance path)

Case 2 : Switch A is at 1 and Switch B is at 0.

In this case, the LED will turn ON.

Case 3 : Switch A is at 0 and Switch B is at 1.

In this case again, the LED is turn ON..

Case 4 : Both the switches are switched to logic 1.

In this case, the LED will go OFF. (Current always follows a low resistance path).

This is the truth Table for XOR Gate considering the above four cases.

Truth Table:

A B Y
0 0 0
0 1 1
1 0 1
1 1 0

 

Tip : The output for this gate is high when both the inputs are the different.

Logic Gates: EX-NOR Gate (Exclusive NOR Gate)

 

 

EXNOR GATE
EXNOR GATE

Consider Ckt in the above diagram, let switch A be the Input 1 and Switch B be the input 2 and the output  will be the glowing of LED if it glows it is one. The inputs will be logic 0 & logic 1 as demonstrated.

The power source is ON continuously,

Case 1 : Both the switches are switched to logic 0.

In this case, the LED will turn ON.

Case 2 : Switch A is at 1 and Switch B is at 0.

In this case, The LED will remain OFF. (Current always follows a low resistance path)

Case 3 : Switch A is at 0 and Switch B is at 1.

In this case, The LED will remain OFF. (Current always follows a low resistance path)

Case 4 : Both the switches are switched to logic 1.

In this case, the LED will turn ON.

This is the truth Table for XNOR Gate considering the above four cases.

Truth Table:

A B Y
0 0 1
0 1 0
1 0 0
1 1 1

 

Tip : The output for this gate is high when both the inputs are the same.

LEAVE A REPLY

Please enter your comment!
Please enter your name here