Block diagram of a computer
Every computer has five functional parts: Input unit → Memory/Storage → CPU (ALU + Control Unit) → Output unit. Data and instructions travel between them on buses.
Central Processing Unit (CPU)
The CPU is the brain of the computer. In modern computers the whole CPU is one chip called the microprocessor. It has three main parts:
- Arithmetic Logic Unit (ALU) – does arithmetic (+, −, ×, ÷) and logical work (comparisons such as >, <, =, and AND/OR/NOT).
- Control Unit (CU) – the "manager": fetches instructions, decodes them and sends control and timing signals to all other parts. It does not process data itself.
- Registers – tiny, very fast storage locations inside the CPU; the fastest memory in a computer.
Important registers
| Register | Holds |
|---|---|
| Program Counter (PC) | Address of the next instruction to be fetched |
| Instruction Register (IR) | The instruction currently being executed |
| Memory Address Register (MAR) | Address of the memory location to read or write |
| Memory Data / Buffer Register (MDR / MBR) | Data being read from or written to memory |
| Accumulator (AC) | Intermediate results of ALU operations |
| Status / Flag register | Conditions such as zero, carry, overflow, sign |
| Stack Pointer (SP) | Address of the top of the stack |
Instruction (machine) cycle
Fetch → Decode → Execute → Store (write back). The CU fetches an instruction from memory (address in PC), decodes it, the ALU executes it and the result is stored. Pipelining overlaps these stages for different instructions so more work is done per second.
Speed of the CPU
- Clock speed – number of cycles per second, measured in hertz; today in GHz (1 GHz = 109 cycles/second).
- MIPS – million instructions per second; FLOPS – floating-point operations per second (used for supercomputers).
- Word size – bits the CPU handles at once (32-bit, 64-bit).
- Cores – independent processing units on one chip (dual-core, quad-core, octa-core). Hyper-threading lets one core run two threads.
- Cache – small, fast memory between CPU and RAM: L1 (fastest, smallest, inside each core), L2, L3 (larger, often shared).
Moore's Law (Gordon Moore, Intel co-founder, 1965): the number of transistors on a chip doubles roughly every two years.
Buses
A bus is a set of wires carrying signals. The system bus has three parts:
- Data bus – carries data; bidirectional.
- Address bus – carries memory addresses from CPU; unidirectional. With n address lines the CPU can address 2n locations (e.g. 32 lines → 4 GB).
- Control bus – carries control signals such as read, write, interrupt.
Architectures
- Von Neumann – one memory for both program and data (stored-program concept). The shared path causes the von Neumann bottleneck.
- Harvard – separate memories and paths for instructions and data; common in microcontrollers and DSPs.
- CISC (Complex Instruction Set Computer) – many complex instructions, e.g. Intel/AMD x86.
- RISC (Reduced Instruction Set Computer) – fewer, simpler instructions, mostly one cycle each, suits pipelining, e.g. ARM (mobiles), RISC-V. India's SHAKTI (IIT Madras) and VEGA (C-DAC) are RISC-V processors.
Motherboard and other parts
- Motherboard – main circuit board holding the CPU socket, RAM slots, chipset, expansion slots (PCI, PCIe) and connectors.
- Chipset – controls data flow between CPU, memory and peripherals (older boards: northbridge and southbridge).
- BIOS/UEFI – firmware that starts the computer and runs the POST (Power-On Self-Test).
- CMOS battery – small cell that keeps the system date/time and BIOS settings when power is off.
- SMPS (Switched-Mode Power Supply) – converts AC mains to the low DC voltages the computer uses.
- Heat sink and fan – cool the processor.
- GPU (Graphics Processing Unit) – processor specialised for graphics and parallel work (also used for AI). A math co-processor/FPU handles floating-point maths.
- Interrupt – a signal that makes the CPU pause its current work to attend to an urgent event (e.g. a key press).
Quick recall: PC → next instruction address · ALU → arithmetic + logic · CU → control signals · Registers → fastest memory · Address bus → one-way · Data bus → two-way · GHz → clock speed.