💻

Overview of Computer Architecture Concepts

Sep 11, 2024

Lecture Notes: Computer Architecture

Introduction

  • Topic Focus: Computer Architecture (Topic 2)
  • Comparison: Considered the most demanding among non-programming topics.
  • Components: CPU, RAM, hard drives, OS.

Central Processing Unit (CPU)

  • Role: Brain of the computer, handles processing of instructions.
  • Operations: Arithmetic and logical operations.
  • Example: Clicking an 'X' on a program triggers CPU execution.

How CPU Works

  • Model: Von Neumann model.
  • Process: Multi-step including program counter, memory address register (MAR), and memory data register (MDR).

Key Components and Processes

  • Program Counter (PC):
    • Sends address to MAR.
    • MAR: Holds memory addresses, sends data to RAM.
    • RAM: Stores program data in addresses.
    • MDR: Receives data from RAM, sends to control unit.
  • Control Unit (CU):
    • Decodes data for execution by Arithmetic Logic Unit (ALU).
    • Orchestrates Fetch-Decode-Execute (FDE) cycle.
  • Arithmetic Logic Unit (ALU):
    • Executes operations, uses the accumulator for temporary storage.

Memory

Primary Memory

  • RAM (Random Access Memory):
    • Volatile, non-persistent.
    • Stores program data temporarily.
  • ROM (Read-Only Memory):
    • Permanent instructions, non-volatile.
    • Stores BIOS and fundamental boot instructions.

Secondary Memory

  • Hard Drive:
    • Long-term, persistent storage.
    • Slower but larger storage compared to RAM.
  • Virtual Memory:
    • Used when RAM is overloaded, slower as it uses hard disk.

Cache

  • Role: Stores frequently used instructions closer to CPU.
  • Benefit: Speeds up data retrieval, sits between CPU and primary memory.

Operating Systems

  • Definition: Software controlling hardware resources, providing services.
  • Roles: User interface, memory management, peripheral management, multitasking, security.
    • User Interface: GUI, CLI, Natural Language, Menu-based.
    • Memory Management: Allocates RAM, organizes data.
    • Peripheral Management: Uses device drivers.
    • Multitasking: Allocates CPU cycles.
    • Security: User permissions and file access.

Data Representation

  • Binary and Bits:
    • Conversion: Binary to denary and vice versa.
    • Units: 1 byte = 8 bits, conversion hierarchy (kB, MB, GB, TB).
  • Text Representation:
    • ASCII: 7 bits + parity bit, 128 characters.
    • Unicode: More bits, more languages.

Image and Color Representation

  • Pixels: Grid of small squares on screens.
  • Color Encoding: 6-digit hexadecimal codes for RGB values.

Logic Gates

  • Concept: Takes one or two inputs (1 or 0) and outputs either a 1 or 0.
  • Types: NOT, AND, OR, XOR, NAND, NOR.
    • NOT Gate: Inverts input.
    • AND Gate: Requires both inputs to be true for true output.
    • OR Gate: Requires at least one true input for true output.
  • Truth Tables: Show all possible inputs/outputs.
  • Chaining Gates: Combine gates for complex operations.

Hexadecimal and Binary

  • Hexadecimal (Base 16):
    • Used for efficiently representing large binary values.
    • Conversion to/from binary.

Important Notes

  • Exams: Familiarity with terms, processes, and conversions is crucial for the IB exam.
  • Resources: Slides and additional materials available for further study.