Learn
3.1.1 | ROLE OF THE CPU
01 | WHAT IS THE CPU?
The central processing unit (CPU) is the processor that carries out program instructions and processes data. It also coordinates operations so the computer’s components work together.
You may hear it called the “brain” of the computer. That is a useful starting metaphor, but an exam answer should say what it actually does: executes instructions, processes data and controls or coordinates operations.
The CPU is not the entire computer. It works with memory, storage and input/output devices.
02 | INSTRUCTIONS AND DATA ARE DIFFERENT
Data is the information being processed. Instructions specify the operations to carry out on that information.
| Task | Data | Instruction / operation | Result |
|---|---|---|---|
| Calculate a total | Prices 12 and 8 | Add the values | 20 |
| Check a pass threshold | Score 65 and threshold 50 | Compare score with threshold | Score meets the threshold |
| Adjust a picture | Pixel values | Apply a brightness operation | Changed pixel values |
| Move a game character | Current position and movement input | Update position using game rules | New position |
The CPU executes machine-code instructions. A program written in a language such as Python must be handled by appropriate software so that the processor ultimately executes machine instructions. The CPU does not directly understand an English instruction such as “make a game”.
03 | INPUT, PROCESSING AND OUTPUT
Imagine a calculator app. You enter 12 and 8, then select addition. The values and chosen operation become data the program uses.
Numbers and chosen operation→PROCESSING
Execute instructions to add→OUTPUT
Display the result, 20
The CPU performs the processing specified by the program. The result can be stored in memory and passed through the output system so the screen displays it.
The keyboard or touchscreen captures input; the display produces visible output. The CPU does not replace those devices. It processes information and coordinates the operations involved.
Not every result is immediately displayed. A result might be kept for another calculation, saved to storage or sent to another device.
04 | CALCULATE, COMPARE AND COORDINATE
Arithmetic: instructions can perform numerical operations such as addition or subtraction.
Logic and comparison: instructions can test conditions, such as whether a score meets a threshold. The program can then follow the appropriate branch.
Control: the CPU manages the execution of instructions and coordinates movement of data between relevant components.
A comparison is not human judgement. A game’s CPU follows programmed rules to decide what happens next. In the next lesson you will study the CPU components responsible for these jobs.
05 | HOW MEMORY AND STORAGE FIT IN
| Component | Main role | Example |
|---|---|---|
| CPU | Execute instructions and process data | Calculate the total |
| RAM | Hold instructions and data currently in use | Keep the running program and working values available |
| Secondary storage | Keep files and programs for longer-term use | Store the saved application or document |
| Input device | Capture data or commands | Keyboard records a key press |
| Output device | Present or act on a result | Screen displays the calculated total |
For a running program, instructions and working data are made available in memory for the CPU to use. The CPU also contains small internal storage locations, which you will study later.
Do not describe the CPU as the place where all files are permanently saved. A storage device preserves files; the processor acts on instructions and data.
06 | A REPEATING INSTRUCTION PROCESS
At a high level, the CPU repeatedly obtains an instruction, interprets what operation it requires and carries it out. This is the fetch–decode–execute cycle.
- Fetch: obtain the next instruction from memory.
- Decode: interpret the instruction.
- Execute: carry out the required operation.
These stages happen repeatedly as a program runs. A single action such as opening a photograph can involve many instructions.
This is an overview of the CPU’s role. The detailed registers, buses and steps of the cycle belong to the following architecture lessons.
07 | WHAT IS A MICROPROCESSOR?
A microprocessor is a processor implemented as an integrated circuit on a single chip. An integrated circuit combines many electronic components in a small semiconductor device.
“CPU” describes the processing role; “microprocessor” describes its implementation on a chip. A CPU can be implemented as a microprocessor.
A microprocessor is not a complete computer by itself. A working system also needs appropriate memory, input/output and other supporting components. Some modern chips integrate several functions, but that does not make the processor and all storage the same thing.
08 | FOLLOW A SCHOOL SENSOR SYSTEM
A room-temperature system receives a sensor reading of 24 °C. Its program compares the reading with a threshold of 22 °C.
The sensor supplies the input. The CPU executes instructions to compare the values. Because 24 is greater than 22, the program selects the instruction path that requests cooling. The output circuitry and actuator carry out that request.
The CPU’s job is processing and control. The sensor measures temperature; the actuator changes the physical environment. Do not award every role to the CPU.
09 | COMMON MISTAKES
- “The CPU is the computer”: it is one component in a system.
- “The CPU permanently stores every file”: distinguish processing from secondary storage.
- “The CPU thinks for itself”: it executes programmed instructions.
- “Data and instructions are identical”: one is processed; the other specifies operations.
- “Microprocessor means a tiny complete computer”: define it as a processor on an integrated-circuit chip.