Logic Gates with Boolean Functions
Signals & Logic Circuits
- Digital systems use two discrete signal levels: 0 (LOW / OFF) and 1 (HIGH / ON)
- Logic circuit = electronic circuit that makes decisions based on binary inputs
- Two classes:
- Basic gates (AND, OR, NOT)
- Combinational gates (built from basics, e.g., NOR, NAND)
Basic Logic Gates
AND Gate
- Boolean: Q=A⋅B (read “A AND B”)
- Output 1 only when all inputs 1; otherwise 0
- With n inputs: Q=1 only if every input =1
OR Gate
- Boolean: Q=A+B (read “A OR B”)
- Output 1 when at least one input 1; 0 only if all inputs 0
NOT Gate
- Boolean: Q=A
- Inverts the input: 0→1, 1→0
Combinational Gates
NOR Gate (NOT-OR)
- Structure: OR gate → NOT gate
- Boolean: Q=A+B
- Output 1 only when all inputs 0
NAND Gate (NOT-AND)
- Structure: AND gate → NOT gate
- Boolean: Q=A⋅B
- Output 0 only when all inputs 1
Designing Circuits & Boolean Expressions
- Convert algebra → gates by reading operators left-to-right
- Example: Q=A⋅(A+B)+B
- OR: A+B
- AND: A⋅(A+B)
- OR with B for final Q
- Number of rows in a truth table = 2n ( n = number of inputs )
Truth Tables (Quick Reference)
- AND: only 1 row = all 1 inputs
- OR: only 0 row = all 0 inputs
- NOT: single input inversion
- NAND: inverse of AND table
- NOR: inverse of OR table
Integrated Circuits (ICs)
- IC = miniaturised network of transistors / resistors / diodes performing a defined logic function
- Logic gates packaged in ICs (e.g., 7408 → 4 × AND gates, 7432 → 4 × OR gates)
- Pin groups: inputs on outer pins, outputs on dedicated pins
Practical Applications
- Home alarm: multiple window/door sensors → OR gate → siren (alarm = 1 if any sensor 1)
- Street-light controller: Manual switch OR (Timer AND Dark-sensor)
- Vehicle security: NOT(Engine) AND (Movement OR Shutter-damage) → alarm
Quick Facts
- AND → ⋅
- OR → +
- NOT → overbar / prime
- NAND, NOR are universal: any logic circuit can be built solely from NAND or NOR gates