Logic Gates - Digital Electronics Basics (AND, OR, NOT, etc.) | TechAmbitionX | Notes By Mr. BILRED
Logic Gates
Definition: Logic gates are the basic building blocks of digital electronics. They take one or more binary inputs (0 = LOW / FALSE, 1 = HIGH / TRUE) and give a single output, based on simple logic rules.
- AND → Multiplication (·)
- OR → Addition (+)
- NOT → Complement (′)
Types of Basic Logic Gates
1. AND Gate
Definition: Output is 1 only when all inputs are 1.
Formula: Y = A · B
Example IC: 7408 (Quad 2-input AND gate)
A | B | Output (A·B) |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
2. OR Gate
Definition: Output is 1 if any input is 1.
Formula: Y = A + B
Example IC: 7432 (Quad 2-input OR gate)
A | B | Output (A + B) |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
3. NOT Gate (Inverter)
Definition: Reverses the input. If input = 0 → output = 1, and vice versa.
Formula: Y = A′
Example IC: 7404 (Hex Inverter – 6 NOT gates)
A | Output (A′) |
---|---|
0 | 1 |
1 | 0 |
Universal Gates
Some gates are called universal gates because you can build any other gate using them alone
For example, a NOT gate can be built from a NAND gate by connecting both inputs together.
4. NAND Gate
Definition: Opposite of AND. Output is 0 only if all inputs are 1.
Formula: Y = (A · B)′
Example IC: 7400 (Quad 2-input NAND gate)
A | B | Output (A·B)′ |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
5. NOR Gate
Definition: Opposite of OR. Output is 1 only if all inputs are 0.
Formula: Y = (A + B)′
Example IC: 7402 (Quad 2-input NOR gate)
A | B | Output (A+B)′ |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
Exclusive Gates
6. XOR Gate (Exclusive OR)
Definition: Output is 1 only if inputs are different.
Formula: Y = A ⊕ B
(that weird symbol ⊕ is XOR)
Example IC: 7486 (Quad 2-input XOR gate)
By the way, this weird thing "⊕" is XOR, okay
A | B | Output (A ⊕ B) |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
7. XNOR Gate (Exclusive NOR)
Definition: Output is 1 only if inputs are the same.
Formula: Y = (A ⊕ B)′
Example IC: 74266 (Quad 2-input XNOR gate)
A | B | Output (A ⊕ B)′ |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Summary
- Basic Gates: AND, OR, NOT
- Derived Gates: NAND, NOR, XOR, XNOR
- Universal Gates: NAND and NOR (can create all others)
- Formulas: Directly follow Boolean algebra rules
- Truth Tables: Show how outputs change for every input
Comments
Post a Comment