Logic Gates with Boolean Functions

Signals & Logic Circuits

  • Digital systems use two discrete signal levels: 00 (LOW / OFF) and 11 (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=ABQ = A \cdot B (read “A AND B”)
  • Output 11 only when all inputs 11; otherwise 00
  • With nn inputs: Q=1Q = 1 only if every input =1=1
OR Gate
  • Boolean: Q=A+BQ = A + B (read “A OR B”)
  • Output 11 when at least one input 11; 00 only if all inputs 00
NOT Gate
  • Boolean: Q=AQ = \overline{A}
  • Inverts the input: 010 \rightarrow 1, 101 \rightarrow 0

Combinational Gates

NOR Gate (NOT-OR)
  • Structure: OR gate → NOT gate
  • Boolean: Q=A+BQ = \overline{A + B}
  • Output 11 only when all inputs 00
NAND Gate (NOT-AND)
  • Structure: AND gate → NOT gate
  • Boolean: Q=ABQ = \overline{A \cdot B}
  • Output 00 only when all inputs 11

Designing Circuits & Boolean Expressions

  • Convert algebra → gates by reading operators left-to-right
    • Example: Q=A(A+B)+BQ = A \cdot (A + B) + B
    1. OR: A+BA + B
    2. AND: A(A+B)A \cdot (A + B)
    3. OR with BB for final QQ
  • Number of rows in a truth table = 2n2^n ( nn = number of inputs )

Truth Tables (Quick Reference)

  • AND: only 11 row = all 11 inputs
  • OR: only 00 row = all 00 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 = 11 if any sensor 11)
  • Street-light controller: Manual switch OR (Timer AND Dark-sensor)
  • Vehicle security: NOT(Engine) AND (Movement OR Shutter-damage) → alarm

Quick Facts

  • AND\text{AND}\cdot
  • OR\text{OR}++
  • NOT\text{NOT} → overbar / prime
  • NAND\text{NAND}, NOR\text{NOR} are universal: any logic circuit can be built solely from NAND or NOR gates