Learning Objectives
- Draw and explain the block diagram of a computer.
- State the role of the CPU and its parts (ALU, CU, registers) and the memory unit.
- Explain the fetch–decode–execute cycle.
- Explain why units of a computer must be interconnected, and name the three system buses.
- Identify factors that affect processor performance.
Detail: cabinet and motherboard, memory hierarchy, how the CPU uses memory.
Block diagram of a computer
flowchart LR
IN[Input unit: keyboard, mouse, scanner] --> MEM
subgraph CPU[Central Processing Unit]
CU[Control Unit]
ALU[Arithmetic Logic Unit]
REG[Registers]
end
MEM[Memory unit: RAM] <--> CU
CU <--> ALU
ALU <--> REG
CU --> OUT[Output unit: monitor, printer]
MEM <--> SEC[Secondary storage: SSD, HDD]
Data enters through the input unit, is held in memory, processed by the CPU, and results leave through the output unit. Secondary storage keeps data permanently.
Central Processing Unit
The CPU (processor) fetches instructions from memory, decodes them, and executes them (the fetch–decode–execute cycle). It contains an ALU (arithmetic and logic), control unit, and registers (tiny, fastest storage). Clock speed and core count affect how many operations it can complete per second, but real speed also depends on memory and storage.
| Part | Function |
|---|---|
| ALU | Performs arithmetic (+, −, ×, ÷) and logical operations (AND, OR, compare) |
| Control Unit | Directs the flow of data and instructions; tells other units what to do |
| Registers | Very small, very fast storage inside the CPU for the current instruction and data |
The instruction cycle: a worked example
To calculate A + B and store it in C:
- Fetch — the control unit fetches the instruction “add A and B” from RAM.
- Decode — the control unit interprets it: an addition is needed, using values A and B.
- Execute — A and B are loaded into registers and the ALU adds them.
- Store — the result is written back to memory location C.
A modern processor repeats this cycle billions of times per second.
Memory unit
Primary memory (RAM) holds the operating system, programs, and data currently in use. It is volatile: contents vanish when power is off. Secondary storage (HDD, SSD) is non-volatile and slower. Registers and cache sit between the ALU and RAM so the CPU is not waiting on every byte.
Interconnecting the units
The motherboard is the printed circuit board that holds the CPU socket, RAM slots, chipset, and expansion slots. Buses (address, data, control) carry signals among CPU, memory, and I/O. Without a shared interconnection, the CPU could not read a keystroke or write a file.
| Bus | Carries | Direction |
|---|---|---|
| Address bus | The memory location the CPU wants to use | One-way (CPU → memory/I/O) |
| Data bus | The actual data being read or written | Two-way |
| Control bus | Commands and timing signals (read, write, clock) | Two-way |
Factors affecting processor performance
- Clock speed — measured in GHz; a 3 GHz CPU completes about three billion clock cycles per second.
- Number of cores — more cores can run more tasks at the same time.
- Cache size — more cache means fewer slow trips to RAM.
- Word size — a 64-bit CPU handles larger chunks of data at once than a 32-bit CPU.
- RAM and storage speed — a fast CPU still waits if RAM is small or the disk is slow.
Nepal / lab example
When a lab PC “feels slow,” the cause is often too little RAM (memory unit) or a failing HDD, not a “weak CPU” alone. Matching hardware to the job is a management decision as well as a technical one.
Scenario: an accounting office in Lalitpur runs Tally and a browser on PCs with 4 GB RAM and old hard disks. Upgrading to 8 GB RAM and an SSD costs far less than replacing every computer and usually makes the PCs feel much faster, because the CPU was spending most of its time waiting for data.
Key Takeaways
- A computer has input, CPU, memory, output, and storage units.
- CPU executes; memory holds working data; buses and the motherboard connect them.
- The CPU contains the ALU, control unit, and registers, and works in a fetch–decode–execute cycle.
- The address, data, and control buses connect the units.
- Faster storage closer to the CPU costs more per byte.
Discussion Questions
- Why can a fast CPU still stall?
- What is the difference between RAM and an SSD in one sentence each?
- What does a bus carry that a cable to a printer also needs, conceptually?
Exam-Style Questions
Short answer
- What are the functions of the ALU and the control unit?
- Name the three types of system bus and what each carries.
- List four factors that affect CPU performance.
Long answer
- Draw the block diagram of a computer and explain the function of each unit.
- Explain the fetch–decode–execute cycle with an example.

