Boolean Algebra and Logical Laws

Boolean Algebra and Digital Logic

Introduction to Boolean Algebra

  • Boolean algebra is a variant of propositional logic that serves as the framework for the design of digital circuits.
  • This topic is directly relevant to computer architecture modules, particularly at the digital logic level.
  • Digital circuits are composed of small, primitive digital devices called gates.
  • Each gate computes a value based on a logical function.
  • Digital values are represented by 00 or 11 (binary).
    • These correspond to a switch being off/on or a low/high voltage.
    • 11 often corresponds to the presence of a pulse, and 00 to the absence of a pulse.
  • In diagrams, AA and BB typically represent input variables, and OO represents the output.

Primitive Logical Gates

1. NOT Gate
  • Input(s): Single input AA
  • Output(s): Single output OO
  • Graphical Representation: An isosceles triangle on its side with a small circle at the end.
  • Functionality:
    • If input AA is 00, output OO is 11.
    • If input AA is 11, output OO is 00.
  • Correspondence: This gate corresponds directly to the negation operation (¬A\neg A) in propositional logic.
2. AND Gate
  • Input(s): Two inputs AA and BB
  • Output(s): Single output OO
  • Graphical Representation: Looks like a square with a semicircle attached to its side.
  • Functionality:
    • Output OO is 11 only when both inputs AA and BB are 11.
    • Otherwise, the output is 00.
      • A=0,B=0O=0A=0, B=0 \Rightarrow O=0
      • A=0,B=1O=0A=0, B=1 \Rightarrow O=0
      • A=1,B=0O=0A=1, B=0 \Rightarrow O=0
      • A=1,B=1O=1A=1, B=1 \Rightarrow O=1
  • Correspondence: This gate corresponds directly to the conjunction operation (ABA \land B) in propositional logic.
3. OR Gate
  • Input(s): Two inputs AA and BB
  • Output(s): Single output OO
  • Graphical Representation: Resembles a Star Trek insignia.
  • Functionality:
    • Output OO is 11 in every case except when both inputs AA and BB are 00.
      • A=0,B=0O=0A=0, B=0 \Rightarrow O=0
      • A=0,B=1O=1A=0, B=1 \Rightarrow O=1
      • A=1,B=0O=1A=1, B=0 \Rightarrow O=1
      • A=1,B=1O=1A=1, B=1 \Rightarrow O=1
  • Correspondence: This gate corresponds directly to the disjunction operation (ABA \lor B) in propositional logic.

Differences Between Gates and Propositional Logic

  • Input/Output Distinction:
    • In digital gates, there's a clear distinction between inputs (knowns) and output (dependent unknown). For example, the NOT gate takes input AA and produces output OO.
    • In propositional logic, formulas generally do not have an explicit notion of