Understanding Binary Numbers and Logic Gates

Aug 22, 2024

Binary Numbers and Logic Gates Lecture Notes

Introduction to Binary Numbers

  • The term binary is associated with the number 2.
  • Binary numbers consist of two possibilities: 0 or 1.
  • In circuits:
    • 0 = Circuit off = false
    • 1 = Circuit on = true
    • Voltage representation: 0 volts (off) and typically 5 volts (on).

Buffer Gate

  • Symbol: Triangle pointing right.
  • Functionality:
    • Input = A, Output = A.
    • Truth Table:
      • Input (1) → Output (1)
      • Input (0) → Output (0)
  • Circuit Representation:
    • Uses an NPN transistor.
    • Connect to a power source and a light-emitting diode (LED) representing output.
    • If voltage is applied to Input A (1), LED is on.
    • If no voltage (0), LED is off.

NOT Gate

  • Symbol: Similar to Buffer but with a circle in front.
  • Functionality:
    • Input = A, Output = A‘ (complement).
    • Truth Table:
      • Input (0) → Output (1)
      • Input (1) → Output (0)
  • Circuit Representation:
    • Similar to Buffer but LED is connected across the collector and emitter of the transistor.
    • If Input A is on (1), LED is off (0).
    • If Input A is off (0), LED is on (1).

AND Gate

  • Symbol: Standard AND gate symbol.
  • Functionality:
    • Inputs: A and B; Output = A * B.
    • Truth Table:
      • Input (0, 0) → Output (0)
      • Input (1, 0) → Output (0)
      • Input (0, 1) → Output (0)
      • Input (1, 1) → Output (1)
  • Circuit Representation:
    • Uses two NPN transistors in series.
    • LED is on only when both A and B are on (1).

OR Gate

  • Symbol: Standard OR gate symbol.
  • Functionality:
    • Inputs: A and B; Output = A + B.
    • Truth Table:
      • Input (0, 0) → Output (0)
      • Input (1, 0) → Output (1)
      • Input (0, 1) → Output (1)
      • Input (1, 1) → Output (1)
  • Circuit Representation:
    • Uses two NPN transistors in parallel.
    • LED is on if either A or B is on.

NAND Gate

  • Symbol: Similar to AND but with a circle at the output.
  • Functionality:
    • Output = (A * B)' (complement of AND gate).
    • Truth Table:
      • Only output (0) when both A and B are 1.
  • Can be constructed using an AND gate followed by a NOT gate.
  • If both inputs A are connected, it acts as a NOT gate.

NOR Gate

  • Symbol: Similar to OR but with a circle at the output.
  • Functionality:
    • Output = (A + B)' (complement of OR gate).
    • Truth Table:
      • Output is 1 only when both A and B are 0.

Writing Functions from Block Diagrams

  • Identify gate types and inputs.
  • Use multiplication for AND gates and addition for OR gates.
  • Example Process:
    1. For AND gate: Output = A * B.
    2. For OR gate: Output = A + B.

SOP and POS Expressions

  • SOP (Sum of Products): Sum of multiple product terms.
  • POS (Product of Sums): Product of multiple sum terms.
  • Literals: Individual variables (complemented or uncomplemented).

Basic Rules of Boolean Algebra

  1. Commutative Property: A + B = B + A; A * B = B * A.
  2. Associative Property: (A + B) + C = A + (B + C); (A * B) * C = A * (B * C).
  3. Identity Rule: A + 0 = A; A * 1 = A.
  4. Null Property: A + 1 = 1; A * 0 = 0.
  5. Complement Property: A + A' = 1; A * A' = 0.

Conclusion

  • Understanding binary numbers, logic gates, and Boolean algebra is crucial for circuit design and logic functions.