Gates and Circuits Study Notes

Chapter Goals

  • Identify Logic Gates: Understand basic gates and their behavior.
  • Combine Gates: Learn how to put basic gates together to form circuits.
  • Boolean Expressions: Use Boolean expressions, truth tables, and logic diagrams to describe gate or circuit behavior.
  • Gate Implementation: Describe how gates are implemented using transistors.

Introduction to Gates and Circuits

  • Gate Definition: A device performing basic logic operations on binary input signals (0 and 1), e.g., AND, OR, NOT.
  • Circuit Definition: A combination of two or more gates designed to execute more complex tasks.

Methods of Describing Logic Circuit Behavior

  • Boolean Expression: Mathematical notation outlining binary logic.
  • Logic Diagram: Graphical representation of gates, each represented by a unique symbol.
  • Truth Table: A table that enumerates all possible input combinations with corresponding output values.

Types of Logic Gates

  • NOT Gate: Inverts the input (0 to 1 or 1 to 0).
  • AND Gate: Outputs 1 only when both inputs are 1.
  • OR Gate: Outputs 1 if at least one input is 1.
  • XOR Gate (Exclusive OR): Outputs 1 if inputs are different, 0 if they are the same.
  • NAND Gate: Outputs 0 only when both inputs are 1 (inversion of AND).
  • NOR Gate: Outputs 1 only when both inputs are 0 (inversion of OR).

Gates with More Inputs

  • Gates can accommodate multiple inputs, e.g., a 3-input AND gate produces an output of 1 when all inputs are 1.

Circuit Types

  • Combinational Circuits: Output is determined solely by current input values.
  • Sequential Circuits: Output depends on current inputs and previous outputs, retaining memory of the last state.
    • Logic is described via Boolean expressions, logic diagrams, and truth tables.

Combinational Circuit Examples

  • Boolean Equivalence: Two circuits may produce equivalent outputs based on Boolean algebra principles (e.g., A(B + C) = AB + AC).

Properties of Boolean Algebra

  • Commutative: $AB = BA$
  • Associative: $(AB)C = A(BC)$
  • Distributive: $A(B + C) = AB + AC$
  • Identity: $A1 = A$, $A + 0 = A$
  • Complement: $A(A') = 0$, $A + (A') = 1$
  • DeMorgan's Laws: $(AB)' = A' + B'$, $(A + B)' = A'B'$

Binary Adders

  • Half Adder: Adds two bits, yields a sum and a potential carry (1 + 1 = 10 in binary).

    • Truth Table for Half Adder:
    • Inputs: A, B
    • Outputs:
      • Sum = $A ext{ XOR } B$
      • Carry = $AB$
  • Full Adder: Adds three bits (two inputs and a carry-in) with sums and carry outputs.

Multiplexers

  • Definition: A MUX selects between multiple input signals based on control signals (also known as selectors).
    • Types: 2-to-1, 4-to-1, n-to-1 MUX (where n is a power of 2).
    • An 8-to-1 MUX uses three control lines to choose from eight inputs.

Circuits as Memory: S-R Latch

  • S-R Latch: A basic memory storage cell retaining a binary state (0 or 1).
    • Outputs are complementary (Q and Q').
  • Truth Table: Describes input states (SET, RESET) determining Q and Q'.

Integrated Circuits (ICs)

  • Definition: A silicon piece embedding multiple gates, forming a compact circuit.
  • Types of ICs based on Gate Count:
    • SSI: Small-Scale Integration (1 to 10 gates)
    • MSI: Medium-Scale Integration (10 to 100 gates)
    • LSI: Large-Scale Integration (100 to 100,000 gates)
    • VLSI: Very-Large-Scale Integration (over 100,000 gates)

Constructing Gates using Transistors

  • Transistor Functionality: Acts as a switch; conducts electricity or blocks it based on input signal voltage, having no moving parts.
  • Logic Gates using Transistors: AND, OR, NOT, NOR, NAND gates can be constructed using transistor arrangements.

CPU Chips

  • Definition: The primary integrated circuit in any computer is the CPU, responsible for executing instructions and managing processes.
  • Connection: Each CPU chip has numerous pins for communication in the computer system.