The central processing unit, or CPU, runs every program. This lesson names its parts in a Von Neumann computer: the arithmetic logic unit and the control unit, the five registers and the three buses. You learn what each part holds or carries, and why.
about 25 min1 simulation1 practice question
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What the CPU does
Think of a calculator. You press keys, it works something out, and it shows the answer. A computer does the same with every program. Data comes in, it is processed, and a result goes out.
The central processing unit (CPU) does the processing. It processes the instructions and the data that are input into the computer, so that the result can be output.
Most CPUs today are a microprocessor. A microprocessor is a type of integrated circuit on a single chip. All the parts of the CPU are made together on one small piece of silicon.
The Von Neumann architecture
Most computers follow a design called the Von Neumann architecture. Its main idea is simple. The program's instructions and its data are both stored in the same memory. The CPU fetches an instruction from memory, then the data that the instruction needs, from the same memory and along the same buses.
A block diagram of a Von Neumann computer. On the left a large box labelled CPU holds the arithmetic logic unit (ALU), the control unit (CU) and five registers: PC, MAR, MDR, CIR and ACC. On the right a box labelled main memory (RAM) holds both instructions and data. Three buses join them: the address bus with an arrow from the CPU to the memory only, and the data bus and the control bus with arrows both ways.
The picture shows the CPU on the left and the main memory (RAM) on the right. Inside the CPU are two units and five registers. Three buses join the CPU to the memory.
The two units
The arithmetic logic unit (ALU) does the calculations, such as adding and subtracting. It also does the logic, such as comparing two numbers.
The control unit (CU) controls everything else. It decodes each instruction and sends signals to the other parts, so that each step happens at the right time.
The five registers
A register is a very small, very fast store inside the CPU. Each one holds a single value. You need to know these five.
Program counter (PC). It holds the address of the next instruction to be fetched.
Memory address register (MAR). It holds the address of the memory location that is being read from or written to.
Memory data register (MDR). It holds the data or instruction that has just been read from memory, or that is about to be written to memory.
Current instruction register (CIR). It holds the instruction that is being decoded and executed now.
Accumulator (ACC). It holds the result of a calculation done by the ALU.
Look at what each one holds. The PC and the MAR hold addresses. The MDR, the CIR and the ACC hold contents: an instruction or a value.
The three buses
A bus is a set of wires that carries signals between the parts of a computer.
The address bus carries addresses from the CPU to the memory. It goes one way only.
The data bus carries data and instructions between the CPU and the memory. It goes both ways, because data is read and written.
The control bus carries control signals, such as "read" and "write" and the clock signal. It goes both ways.
A tiny program
Here is a program in memory. The four instructions are made up for this lesson. Each real CPU has its own set of commands, as the last lesson of this course explains.
Address 10: LOAD 20. Copy the value at address 20 into the ACC.
Address 11: ADD 21. Add the value at address 21 to the ACC.
Address 12: STORE 22. Copy the ACC into address 22.
Address 13: STOP.
If address 20 holds 7 and address 21 holds 5, the ACC holds 7 after LOAD and 12 after ADD. STORE then writes 12 into address 22. The instructions and the numbers sit side by side in one memory. That is the Von Neumann idea at work.
Practise with new numbers
Try it in Python
The program keeps the tiny program and its data in one Python dictionary, the memory. It then does the work of the three instructions, one line each, and prints the accumulator.
Common mistakes
Mixing up the MAR and the MDR. The MAR holds an address. The MDR holds the data at that address.
Saying the PC holds the current instruction. The PC holds the address of the next instruction. The CIR holds the current one.
Saying the address bus goes both ways. Addresses only go from the CPU to the memory.
Calling the ALU the control unit. The ALU calculates and compares. The CU decodes and controls.
Remember these
The CPU processes instructions and data so that a result can be output. A microprocessor is an integrated circuit on a single chip.
Von Neumann: instructions and data share one memory.
ALU: calculations and logic. CU: decodes instructions and sends control signals.
PC, MAR: addresses. MDR, CIR, ACC: contents.
Address bus: one way. Data bus and control bus: both ways.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Which register holds the address of the next instruction?
A value has just been read from memory. Which register holds it?
Which unit compares two numbers to see which is larger?
Why does the data bus carry signals in both directions, but the address bus in only one?
What does the Von Neumann architecture say about where a program and its data are kept?
References
Cambridge International, IGCSE Computer Science 0478 syllabus (2026, 2027 and 2028), section 3.1 Computer architecture, outcomes 1 and 2(a): the CPU, the microprocessor, the units, the registers and the buses.
Enroll free in The Processor and the Fetch-Decode-Execute Cycle
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.