Logic gates are the fundamental building blocks of digital circuits. They perform basic logical functions that are essential for digital systems. Here’s a brief overview of the main types of logic gates:
1. AND Gate
Symbol:
Function: Outputs 1 only if all inputs are 1.
Truth Table:
A
B
Output (A AND B)
0
0
0
0
1
0
1
0
0
1
1
1
2. OR Gate
Symbol:
Function: Outputs 1 if at least one input is 1.
Truth Table
A
B
Output (A OR B)
0
0
0
0
1
1
1
0
1
1
1
1
3. XOR Gate (Exclusive OR)
Symbol:
Function: Outputs 1 if only one input is 1.
Truth Table
A
B
Output (A XOR B)
0
0
0
0
1
1
1
0
1
1
1
0
4. NOT Gate (Inverter)
Symbol:
Function: Outputs the opposite of the input.
Truth Table:
A
Output (NOT A)
0
1
1
0
5. NAND Gate (NOT AND)
Symbol:
Function: Outputs 0 only if all inputs are 1.
Truth Table:
A
B
Output (A NAND B)
0
0
1
0
1
1
1
0
1
1
1
0
6. NOR Gate (NOT OR)
Symbol:
Function: Outputs 0 if at least one input is 1.
Truth Table:
A
B
Output (A NOR B)
0
0
1
0
1
0
1
0
0
1
1
0
7. XNOR Gate (Exclusive NOR)
Symbol:
Function: Outputs 1 if the inputs are the same.
Truth Table:
A
B
Output (A XNOR B)
0
0
1
0
1
0
1
0
0
1
1
1
Applications
AND Gate: Used in digital circuits where an operation needs to occur only when all conditions are met.
OR Gate: Used in circuits where an operation should occur if at least one condition is met.
XOR Gate: Used in arithmetic circuits, error detection, and correction systems.
NOT Gate: Used to invert a signal in digital circuits.
NAND Gate: Widely used in digital logic design due to its simplicity and versatility (universal gate).
NOR Gate: Also a universal gate; used in various digital circuits.
XNOR Gate: Used in equality comparators and some error detection systems.