Unit 1 - Notes

CAP321 8 min read

Unit 1: Introduction to basic computer Hardware

1. Introduction to Computer Hardware Components

Computer hardware refers to the physical, tangible components of a computer system that can be seen and touched. These components work together under the direction of software to process data into meaningful information.

Hardware is traditionally classified into four primary categories based on the Von Neumann Architecture:

  • Input Devices: Hardware used to enter data and instructions into the computer.
    • Examples: Keyboard, mouse, scanner, microphone, webcam, biometric sensors.
  • Processing Devices: The core components responsible for executing instructions, performing calculations, and managing data flow.
    • Examples: Central Processing Unit (CPU), Graphics Processing Unit (GPU).
  • Storage Devices: Components used to retain digital data.
    • Primary Storage (Volatile): Random Access Memory (RAM), Cache. Loses data when power is off.
    • Secondary Storage (Non-volatile): Hard Disk Drives (HDD), Solid State Drives (SSD), Optical Drives (CD/DVD), USB Flash Drives. Retains data without power.
  • Output Devices: Hardware that translates processed data into human-readable form.
    • Examples: Monitors (displays), printers, speakers, projectors.

2. System Modules and Functions

A modern computer is not a single entity but a collection of interconnected sub-systems or "modules." Each module has a specific function critical to system stability and performance.

Key System Modules:

  • Power Supply Unit (PSU):
    • Function: Converts standard alternating current (AC) from a wall outlet into stable direct current (DC) required by internal components. It regulates voltages (typically +3.3V, +5V, and +12V) to ensure hardware is not damaged by power fluctuations.
  • Cooling Subsystem:
    • Function: Dissipates heat generated by processing components.
    • Types: Active cooling (fans, liquid cooling pumps) and Passive cooling (metal heatsinks, thermal pads, heat pipes).
  • Storage Subsystem:
    • Function: Manages the long-term reading, writing, and logical organization of data files and operating system files. Includes the drives themselves and the storage controllers on the motherboard.
  • Input/Output (I/O) Subsystem:
    • Function: Manages the communication between the CPU/RAM and external peripherals. It relies on system buses to move data back and forth efficiently.

3. CPU Chips and Characteristics

The Central Processing Unit (CPU) is the "brain" of the computer, responsible for executing software instructions.

Internal CPU Components:

  1. Arithmetic Logic Unit (ALU): Performs mathematical calculations (addition, subtraction) and logical operations (AND, OR, NOT).
  2. Control Unit (CU): Directs the operation of the processor. It fetches instructions from memory, decodes them, and coordinates the ALU and registers to execute them.
  3. Registers: Extremely fast, small amounts of memory located directly inside the CPU used to hold temporary data and instructions currently being processed.
  4. Cache Memory: High-speed SRAM built into the CPU to store frequently accessed data, bridging the speed gap between the CPU and slower main RAM. Divided into L1 (fastest, smallest), L2, and L3 (slowest, largest) levels.

Key CPU Characteristics:

  • Clock Speed: Measured in Gigahertz (GHz). It represents how many billions of cycles the CPU can execute per second.
  • Cores and Threads:
    • Multi-core: A single physical CPU chip containing multiple independent processing units (cores), allowing true parallel processing.
    • Hyper-Threading / SMT: A technology allowing a single physical core to act as two logical cores (threads), improving multitasking efficiency.
  • Instruction Set Architecture (ISA): The language the CPU understands. The two dominant ISAs are x86/x64 (Intel/AMD for desktops/servers) and ARM (Apple Silicon, mobile devices, emphasizing power efficiency).
  • Socket Type: The physical connector on the motherboard.
    • PGA (Pin Grid Array): Pins are on the CPU (common in older AMD).
    • LGA (Land Grid Array): Pins are in the motherboard socket, flat pads on the CPU (Intel, modern AMD).
  • TDP (Thermal Design Power): Measured in watts; represents the maximum heat the cooling system needs to dissipate under a typical heavy workload.

4. Motherboard: Components and Architecture

The Motherboard (or Mainboard) is the primary printed circuit board (PCB) that connects all hardware components.

Form Factors:

The physical size and layout of the motherboard, dictating the computer case size.

  • ATX: Standard size (12 × 9.6 inches), highly expandable.
  • Micro-ATX (mATX): Smaller footprint, fewer expansion slots.
  • Mini-ITX: Compact size (6.7 × 6.7 inches) for small form factor builds, usually limited to one expansion slot.

Core Components and Architecture:

  • CPU Socket: Receptacle for the processor.
  • RAM Slots (DIMM Slots): Where memory modules are installed.
  • Chipset: The silicon "traffic cop" that manages data flow between the CPU, RAM, and peripherals.
    • Legacy Architecture: Divided into the Northbridge (managed high-speed communication like RAM and GPU) and Southbridge (managed slower I/O like USB and SATA).
    • Modern Architecture: Northbridge functions are integrated directly into the CPU. The Southbridge has been replaced by the PCH (Platform Controller Hub).
  • Expansion Slots (PCIe - Peripheral Component Interconnect Express): Used to add expansion cards like GPUs, network cards, and sound cards. Measured in lanes (x1, x4, x8, x16) which dictate bandwidth.
  • Storage Interfaces:
    • SATA (Serial ATA): Older interface for HDDs and 2.5" SSDs.
    • M.2: Modern slot for high-speed NVMe SSDs directly on the board.
  • VRM (Voltage Regulator Module): Cleans and steps down the 12V power from the PSU to the specific, precise voltages required by the CPU (often ~1.0V to 1.4V).
  • CMOS Battery & BIOS/UEFI Chip: The firmware chip (BIOS/UEFI) contains the startup instructions (POST). The CMOS battery keeps the system clock running and preserves firmware settings when the PC is unplugged.

5. RAM Terminology

Random Access Memory (RAM) is the system's volatile working space. When an application is opened, it is moved from the slow storage drive into the fast RAM for the CPU to access.

Important RAM Concepts:

  • Generations (DDR - Double Data Rate): Modern memory transfers data on both the rising and falling edges of the clock signal. Generations include DDR3, DDR4, and DDR5. They are not forward or backward compatible due to different physical notch placements.
  • Capacity: Measured in Gigabytes (GB). E.g., 8GB, 16GB, 32GB. Dictates how many applications can be open simultaneously.
  • Speed / Frequency: Measured in Megatransfers per second (MT/s) or colloquially in Megahertz (MHz). Higher speeds allow data to move in and out of RAM faster.
  • CAS Latency (CL) & Timings: The delay (in clock cycles) between when a memory controller requests data and when the RAM module actually delivers it. Lower CL numbers (e.g., CL16 vs CL32) indicate faster response times.
  • Memory Channels:
    • Single-Channel: One 64-bit data path between RAM and CPU.
    • Dual-Channel: Two 64-bit paths (128-bit total), doubling the memory bandwidth. Requires installing matched RAM sticks in specific slots.
  • ECC (Error-Correcting Code): Specialized RAM used in servers and workstations that can detect and correct single-bit data corruption to prevent system crashes.
  • Form Factors:
    • DIMM (Dual In-line Memory Module): Used in desktop computers.
    • SO-DIMM (Small Outline DIMM): Shorter modules used in laptops and mini-PCs.

6. Ports, Cables, and Connectors

Ports and cables provide the physical interfaces for connecting hardware.

External Ports (Peripheral I/O):

  • Universal Serial Bus (USB):
    • Type-A: Rectangular, standard legacy connector.
    • Type-B: Square-ish, usually found on printers.
    • Type-C: Reversible, oval-shaped connector capable of data, video, and power delivery.
    • Generations: USB 2.0 (480 Mbps), USB 3.0/3.2 Gen 1 (5 Gbps), USB 4 (up to 40 Gbps).
  • Thunderbolt: Originally developed by Intel/Apple. Uses the USB-C connector but supports massive bandwidth (40 Gbps for Thunderbolt 3/4) and allows daisy-chaining devices.
  • Video Interfaces:
    • HDMI (High-Definition Multimedia Interface): Carries high-definition digital video and audio. Common in consumer electronics.
    • DisplayPort (DP): Carries digital video and audio. Preferred for high-refresh-rate PC gaming and professional monitors.
    • VGA (Video Graphics Array): Legacy, analog-only video connection (blue connector with 15 pins).
  • Networking:
    • RJ-45 (Ethernet): Standard connector for wired local area networks (LAN).
  • Audio:
    • 3.5mm TRS/TRRS jacks: Analog audio for headphones/microphones.
    • TOSLINK (S/PDIF): Optical digital audio cable.

Internal Connectors:

  • 24-pin ATX Power: Main power delivery from the PSU to the motherboard.
  • 8-pin EPS Power: Delivers dedicated power to the CPU.
  • PCIe Power (6-pin / 8-pin / 12VHPWR): Delivers extra power to discrete graphics cards.
  • Front Panel Headers: Tiny pins on the motherboard connecting to the computer case's power button, reset switch, and front LEDs.

7. System Resources

System resources are logical communication channels that hardware devices use to communicate with the CPU and the Operating System. In modern Plug-and-Play (PnP) systems, these are assigned automatically, but understanding them is crucial for low-level hardware troubleshooting.

The Four Types of System Resources:

  1. Interrupt Requests (IRQs):
    • Hardware lines over which devices can send interrupt signals to the CPU.
    • Function: When a device (like a keyboard) needs immediate attention, it sends an IRQ. The CPU pauses its current task, handles the keystroke, and then resumes normal operation. Modern systems use APIC (Advanced Programmable Interrupt Controller) to manage hundreds of virtual IRQs without conflicts.
  2. I/O Addresses (Input/Output Ports):
    • Function: A specific location in memory assigned to a device. The CPU uses this hexadecimal address to send instructions and receive status updates to and from a specific piece of hardware (e.g., telling a printer to print).
  3. Memory Addresses:
    • Function: Blocks of main system RAM temporarily assigned to a specific hardware device and its driver to buffer data.
  4. Direct Memory Access (DMA) Channels:
    • Function: A specialized controller that allows hardware devices (like a storage drive or sound card) to send data directly to the RAM without passing through the CPU. This significantly reduces CPU overhead and speeds up heavy data transfers.