Hardware forms the physical foundation of every computer system, comprising the tangible components essential for processing, storing, and communicating information. This section will explore the core hardware elements fundamental to computing:
Computer architecture and the CPU
Input and output devices
Data storage (primary and secondary)
Network hardware
Computer Architecture and the CPU
At the heart of every computer lies the Central Processing Unit (CPU), often called the "brain." It executes instructions, performs calculations, and coordinates system activities.
The Role of the CPU
The CPU processes instructions and data input into the computer, enabling all actions from opening files to playing videos by fetching, decoding, and executing millions of instructions per second.
Von Neumann Architecture
Most modern computers follow the Von Neumann architecture, a foundational design consisting of several key components working together:
Processing Units
Arithmetic Logic Unit (ALU): Performs arithmetic and logical operations.
Control Unit (CU): Coordinates and controls CPU activities, fetching and decoding instructions.
Registers (Temporary Storage)
Program Counter (PC): Holds address of next instruction.
Memory Address Register (MAR): Holds address of memory location being accessed.
Memory Data Register (MDR): Holds data transferred to or from memory.
Current Instruction Register (CIR): Holds instruction being decoded/executed.
Address Bus: Carries memory addresses from CPU to memory (one-way).
Data Bus: Carries data between CPU, memory, and I/O devices (two-way).
Control Bus: Carries control signals and commands (two-way).
The Fetch-Decode-Execute (FDE) Cycle
The Fetch-Decode-Execute cycle is the fundamental process the CPU repeats billions of times per second to run programs, transforming stored instructions into actions.
1
FETCH
Program Counter (PC) address copied to Memory Address Register (MAR).
Address sent to RAM via Address Bus; instruction retrieved.
Instruction travels via Data Bus to Memory Data Register (MDR), then to Current Instruction Register (CIR).
Program Counter (PC) increments.
2
DECODE
Control Unit (CU) examines instruction in CIR.
CU interprets instruction, determining operation, data needed, and location.
Control signals sent via Control Bus to prepare components.
3
EXECUTE
Appropriate component (e.g., ALU) performs the instruction.
Results are typically stored in the Accumulator (ACC).
The cycle returns to FETCH for the next instruction.
The FDE cycle repeats billions of times per second—clock speed (measured in GHz) determines how fast this happens.
CPU Performance Factors
Three key factors affect CPU performance: number of cores, cache size, and clock speed.
Number of Cores
Modern CPUs contain multiple processing units on a single chip.
Multi-core can execute multiple instruction streams simultaneously.
More cores lead to better multitasking and parallel processing.
Cache Size
Cache is ultra-fast memory on the CPU chip that stores frequently accessed data and instructions.
Three levels: L1 (smallest, fastest), L2 (medium), L3 (largest, shared).
Larger cache reduces waiting for RAM, leading to faster performance.
Clock Speed
Measured in GHz, representing billions of instruction cycles per second.
Higher speed means more FDE cycles per second and faster processing.
Higher clock speeds generate more heat and use more power.
Input and Output Devices
Input devices allow data entry into computers; output devices present information to users.
Input Devices
Barcode scanner
Digital camera
Keyboard
Microphone
Optical mouse
QR code scanner
Touch screen (resistive, capacitive, infra-red)
2D and 3D scanners
Output Devices
Actuator
DLP projector
Inkjet printer
Laser printer
LED screen
LCD projector
LCD screen
Speaker
3D printer
Data Storage
Computers use two types of storage: primary storage (directly accessed by CPU) and secondary storage (permanent data storage).
Primary Storage
RAM (Random Access Memory): Volatile, loses data when power off, stores currently running programs and data.
ROM (Read Only Memory): Non-volatile, retains data when power off, stores boot instructions and firmware.
Why both needed: RAM for fast access to current work, ROM for permanent system instructions.
Secondary Storage
Magnetic: Hard Disk Drive (HDD) - uses platters, tracks, sectors, electromagnets.
Optical: CD, DVD, Blu-ray - uses lasers to read pits and lands.
Solid-state (Flash): SSD, SD card, USB drive - uses NAND/NOR technology, transistors as gates.
Virtual Memory
Pages transferred between RAM and hard drive when RAM is full to simulate more memory.
Cloud Storage
Data stored on remote servers, accessed via the internet.
Network Hardware
Network hardware enables computers to connect and communicate on networks and the internet.
Network Interface Card (NIC)
Connects computer to a network
Has a unique MAC address assigned at manufacture
MAC address structure: manufacturer code + serial code
MAC addresses written in hexadecimal
IP Addresses
Allocated by the network (not at manufacture like MAC)
Can be static (permanent) or dynamic (changes)
Two types: IPv4 and IPv6
IPv4: shorter addresses, running out
IPv6: longer addresses, more available
Router
Sends data to specific destinations on a network
Assigns IP addresses to devices
Connects local network to the internet
Powered by Bytonix — Digital Learning for Computer Science