Computer Organization & Block Diagram
Computer Organization and the Digital Computer
A digital computer is organised into five functional units connected by buses. Instructions and data share memory, so the control unit can fetch, decode and execute a stored program without rewiring the machine. Address-bus width fixes addressable memory, data-bus width fixes bits per transfer, and the instruction cycle repeats under clock control. Computers are classed as micro, mini, mainframe or supercomputer by scale, throughput and use.
Functional units
The five units are input, memory, arithmetic logic, control and output. The ALU and control unit together form the central processing unit (CPU).
- Input unit: accepts data and instructions from devices such as a keyboard, scanner, camera or sensor.
- Memory unit: stores programs and data in addressable locations, usually main memory (RAM).
- Arithmetic logic unit (ALU): performs arithmetic (add, subtract) and logic (AND, OR, compare) operations.
- Control unit (CU): fetches and decodes instructions, then sends timing and control signals; it does not process data.
- Output unit: presents results through a monitor, printer, speaker or actuator.
- CPU = ALU + control unit + registers; buses connect all five units.
| Unit | Main job | Examples |
|---|---|---|
| Input | Converts external data into digital signals | Keyboard, mouse, scanner, sensor |
| Memory | Stores programs and data for immediate use | RAM / main memory |
| ALU | Performs arithmetic and logical operations | Add, compare, AND |
| Control | Fetches, decodes and sequences instructions | Program counter, clock, control signals |
| Output | Converts digital results into human or physical form | Monitor, printer, actuator |
Stored-program concept
The 1945 von Neumann design stores instructions and data in the same addressable memory. Changing the program changes the machine behaviour without rewiring.
- Instructions occupy memory locations exactly like data.
- The program counter holds the address of the next instruction.
- A program must be loaded into memory before execution.
- One machine can perform many tasks by loading different programs.
- Instructions and data share the CPU-memory path, creating the von Neumann bottleneck.
- Caches reduce the bottleneck by keeping recent instructions and data close to the CPU.
System buses
A bus is a shared group of wires with rules for access. Only one transfer uses the bus at a time.
- Address bus: carries the location to be read or written.
- n address lines select 2^n locations; a byte-addressable 16-bit bus reaches 2^16 B = 64 KiB.
- A 20-bit address bus reaches 2^20 B = 1 MiB; a 32-bit bus reaches 4 GiB.
- Data bus: carries the instruction or data word; width sets the bits moved per transfer (8, 16, 32 or 64).
- Control bus: carries read, write, clock, interrupt and reset signals.
- More address lines increase capacity; a wider data bus increases transfer rate.
| Bus | Carries | Width determines |
|---|---|---|
| Address | Memory or I/O location | Number of addressable locations (2^n) |
| Data | Instruction or data word | Bits transferred per cycle |
| Control | Read, write, clock, interrupt, reset | Timing and type of operation |
Fetch-decode-execute cycle
The control unit repeats the cycle for every instruction. At 2 GHz one clock cycle lasts 0.5 ns, so a four-cycle instruction takes 2 ns.
- Fetch copies the instruction at the program counter into the instruction register (IR).
- The program counter is incremented to point to the next instruction.
- Decode identifies the opcode and any register or memory operands.
- Execute performs the ALU operation, moves data, or changes the PC on a branch.
- Write-back stores the result in a register or memory.
- An interrupt can suspend the cycle so a device can be serviced.
- Pipelining overlaps stages of different instructions, approaching one completed instruction per cycle.
FETCH PC -> MAR; memory -> MDR -> IR; PC <- PC + 1
DECODE control unit identifies opcode and operands
EXECUTE ALU operation, data movement or branch
WRITE result -> register or memory
INTERRUPT check pending device requestsInput/output and secondary storage
Input and output devices connect through controllers and ports. Secondary storage keeps programs and files after power is removed.
- Input devices convert keystrokes, images, sound or physical measurements into digital data.
- Output devices convert digital results into text, images, sound or motion.
- A device controller manages the device and connects through a port such as USB, HDMI, SATA or NVMe.
- Interrupts signal the CPU when a device needs service, avoiding continuous polling.
- DMA transfers a block between a device and memory without the CPU copying each byte.
- Secondary storage is nonvolatile: HDD (magnetic), SSD (flash) and optical discs retain data without power.
- Typical HDD seek time is about 9 ms; NVMe SSD latency is under 0.1 ms.
Computer classifications
Computers are classified by size, price, throughput and intended use. The labels track scale and age quickly.
- Microcomputer: a microprocessor-based personal system such as a desktop, laptop, tablet or phone.
- Minicomputer or midrange server: serves a department or small business.
- Mainframe: high reliability and many simultaneous users, common in banks and insurers.
- Supercomputer: fastest class at a given time, using thousands of processors in parallel for weather, drug discovery and simulation.
- Throughput is the amount of work completed per second.
- A current phone outperforms a 1990 supercomputer, so classify by role and scale, not fixed specifications.
Exam points
- The five functional units are input, memory, ALU, control and output; ALU, control unit and registers form the CPU.
- A stored-program computer keeps instructions and data in the same addressable memory.
- Address-bus width n gives 2^n addressable locations; a 20-bit bus addresses 1 MiB on a byte-addressable machine.
- Data-bus width sets bits per transfer; control-bus lines carry read, write, clock, interrupt and reset.
- The instruction cycle is fetch, decode, execute and write-back, with the PC advanced during fetch.
- Micro, mini, mainframe and supercomputer classify computers by scale, throughput and use.
Key terms
- Stored-program concept
- A design in which instructions and data reside in the same addressable memory, so loading a program changes machine behaviour without rewiring.
- System bus
- The shared address, data and control lines that carry information between the CPU, memory and input/output devices.
- Program counter (PC)
- A CPU register that holds the address of the next instruction to be fetched.
Check yourself
Quick check
A byte-addressable CPU has a 20-bit address bus. What is the maximum memory it can address?
Which statement describes the stored-program concept?