Table of Contents
1. What is a Logic Gate?
A logic gate is an electronic circuit that:
- Takes one or more binary inputs (0 or 1)
- Produces a single binary output
Logic gates are the building blocks of digital computers.
2. Binary Digits
- 0 → LOW / FALSE / OFF
- 1 → HIGH / TRUE / ON
3. Types of Logic Gates
Logic gates are divided into:
- Basic Gates
- AND
- OR
- NOT
- Universal Gates
- NAND
- NOR
- Derived / Special Gates
- XOR
- XNOR
BASIC LOGIC GATES
4. AND Gate
Symbol: ∧
Operation: Output is 1 only if all inputs are 1
Boolean Expression:


Truth Table:
| A | B | |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Example:
A security system opens only when all conditions are true.
5. OR Gate
Symbol: +
Operation: Output is 1 if any input is 1
Boolean Expression:


Truth Table:
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Example:
A bulb turns on if any switch is on.
6. NOT Gate (Inverter)
Operation: Output is the opposite of input
Boolean Expression:

Truth Table:
| A | Y |
|---|---|
| 0 | 1 |
| 1 | 0 |
Example:
Used to invert signals.
UNIVERSAL LOGIC GATES
7. NAND Gate
Combination: AND + NOT
Operation: Output is 0 only when all inputs are 1
Boolean Expression:

Truth Table:
| A | B | Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Important:
✔ NAND is a Universal Gate (can create all other gates).
8. NOR Gate
Combination: OR + NOT
Operation: Output is 1 only when all inputs are 0
Boolean Expression:

Truth Table:
| A | B | Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
Important:
✔ NOR is also a Universal Gate.
SPECIAL LOGIC GATES
9. XOR Gate (Exclusive OR)
Operation: Output is 1 when inputs are different
Boolean Expression:

Truth Table:
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Example:
Used in adders and comparators.
10. XNOR Gate
Operation: Output is 1 when inputs are same
Boolean Expression:

Truth Table:
| A | B | Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
11. Universal Gates Concept
A Universal Gate is one that can be used to make all other gates.
✔ NAND
✔ NOR
12. Summary Table
| Gate | Output Condition |
|---|---|
| AND | All inputs = 1 |
| OR | Any input = 1 |
| NOT | Inverts input |
| NAND | NOT of AND |
| NOR | NOT of OR |
| XOR | Inputs different |
| XNOR | Inputs same |
Difference Between Analog and Digital Computer

