Learn
A1.1.1 | MAIN CPU COMPONENTS
01 | ONE CALCULATION, SEVERAL DIFFERENT JOBS
When a program adds two scores, the CPU does not simply “know the answer”. It must obtain an instruction, interpret what that instruction asks, find the required values, perform the operation and keep or store the result. Different components have different jobs in this process.
The central processing unit (CPU) carries out program instructions and coordinates processing. A useful starting model has two main units: the control unit (CU) and arithmetic logic unit (ALU). Small storage locations called registers hold the information these units need immediately. Buses provide communication paths.
Imagine a running total of 7 and a new score of 5. The ALU can calculate 12, but that is only one part of the story. Something must direct the addition, identify where 5 is stored, transfer it into the CPU and retain the result. This lesson follows those relationships.
For this IB objective, describing a component means saying what it does. Describing an interaction means connecting its job to another component: what moves, where it goes and why.
02 | SEE THE COMPONENTS AS A SYSTEM
Read the diagram from the inside out. The CU, ALU and registers are inside the CPU. Main memory holds the example’s instructions and data. The three buses connect the CPU to memory in this simplified system.
A memory address identifies a location; its contents are the value stored there. Address 20 contains 5. Asking for location 20 does not mean the CPU is about to add the number 20. Keep “where?” and “what value?” separate as you follow each transfer.
03 | THE CONTROL UNIT: DIRECTING THE WORK
The CU coordinates the operations needed to carry out an instruction. It interprets the instruction held in the instruction register and generates control signals so the right transfers and operations occur.
Suppose the current instruction is ADD 20. In this teaching instruction set, ADD names the operation, and 20 identifies the memory location of the value to add. The CU interprets the instruction, arranges the memory read and directs the ALU to add the retrieved value to the working total.
An instruction’s operation part is called its opcode. An associated value or reference is its operand. Here ADD is the readable operation name and 20 is an address operand. Actual machine instructions are encoded in binary; these words make the example easier to follow.
The CU does not perform the arithmetic itself. It directs the activity. A precise interaction statement is: “The CU decodes the instruction in the IR and sends control signals that select the ALU operation.”
04 | THE ALU: CALCULATIONS AND LOGICAL OPERATIONS
The ALU performs arithmetic operations, such as addition, and logical operations, such as bitwise AND or comparisons supported by the processor. A comparison helps a program make a decision, for example whether a score has reached a target.
In our running-total example, the working value is 7 and the new operand is 5. Under CU control, the ALU computes 7 + 5. The result 12 is placed into the accumulator in this model, ready for a later instruction.
The ALU works on values made available inside the CPU. It does not decide which program instruction should be fetched next, and it does not independently choose a memory address by reading a high-level Python variable name.
Not every instruction requires an arithmetic calculation. A load copies a value into working storage; a store transfers a value to memory. The CU still coordinates those actions even when the ALU is not adding two numbers.
05 | REGISTERS: SMALL STORAGE WITH SPECIFIC ROLES
A register is a very small, fast storage location inside the processor. Registers are not separate hard drives or whole RAM modules. They hold the addresses, instructions and working values involved in current processing.
Several registers may contain numbers, but the meaning of each number depends on the register’s job. A PC value of 100 means “the next instruction is at address 100”. An AC value of 7 is a working data value. Confusing these roles makes CPU diagrams much harder than they need to be.
| Register | Full name | What it holds | Example meaning |
|---|---|---|---|
| PC | Program counter | Address of the next instruction to fetch | 100 points to the instruction stored at address 100 |
| IR | Instruction register | The instruction currently being processed | ADD 20 tells the CU which operation to direct |
| MAR | Memory address register | Address of the memory location being accessed | 20 selects the location containing the new score |
| MDR | Memory data register | Value being transferred to or from memory | 5 is the returned score, not its address |
| AC | Accumulator | A working value or intermediate result | 7 before the addition; 12 afterwards |
Some resources call the instruction register CIR, for current instruction register, and use ACC instead of AC. This page uses the IB guide’s IR and AC names. These are alternative labels for the corresponding roles in this simplified model.
06 | PC AND IR: NEXT ADDRESS, CURRENT INSTRUCTION
The PC helps the CPU keep its place in the program. Its value supplies the location of the next instruction to fetch. During a normal sequential fetch, it advances to the following instruction’s address. A branch instruction can change that sequence.
The IR holds the instruction being processed after it has been fetched. While the CU interprets ADD 20 in the IR, the PC can already point to the following instruction. The two registers therefore hold different kinds of information at the same time.
Our teaching memory uses one location per instruction, so 100 advances to 101. Real processors may use different instruction sizes and address conventions. The important principle is “next instruction address”, not that every physical CPU always adds one.
A useful check: if PC = 101 and IR = ADD 20, the CPU is processing ADD 20 while keeping address 101 ready for the next fetch. PC does not hold the whole ADD instruction.
07 | MAR AND MDR: WHERE AND WHAT
MAR identifies the location for a memory access. MDR holds the value transferred during that access. They cooperate but are not interchangeable.
For a read of the new score, MAR receives 20. The address bus carries that address, and a read signal requests the contents. Memory returns 5 along the data bus into MDR. The location is 20; the returned value is 5.
For a write of the total, MAR receives the destination address 21. MDR receives the value 12 to store. A write signal tells memory to accept that value at the selected location.
The MDR can carry an instruction as well as ordinary data. When address 100 is read, its contents are the encoded ADD instruction. Later, reading address 20 reuses MDR for the value 5. The IR keeps the current instruction while that reuse happens.
08 | THE THREE BUSES: ADDRESS, VALUE AND CONTROL
A bus is a communication pathway carrying related signals between components. The three-bus model separates the location being selected, the values being transferred and the signals coordinating the operation.
| Bus | Carries | Direction in this CPU–memory model | During a read of location 20 |
|---|---|---|---|
| Address | The location to access | CPU to memory | Address 20 selects the score location |
| Data | Instructions and data values | Either direction, depending on the transfer | The value 5 travels from memory to CPU |
| Control | Coordination and status signals | Signals can travel in either direction | CPU requests a read; memory can return status |
During a write, the data bus carries the value from CPU to memory instead. The address bus still supplies the destination location. A write control signal distinguishes this from a read.
The control bus is not a second data bus. Its signals coordinate actions such as read and write and can include status or interrupt signals. The exact signals vary by system. A bus also does not permanently store its transferred value; that is the role of storage such as registers or memory.
09 | FOLLOW THE ADDITION AND STORE THE RESULT
Start with AC = 7, PC = 100, memory[20] = 5 and memory[21] = 0. Address 100 contains ADD 20; address 101 contains STORE 21. Our two-instruction program adds the score and then saves the result.
The notation memory[20] means “the contents at address 20”. ADD 20 uses that stored value, not the literal number 20. STORE 21 writes the accumulator’s value into address 21.
Select Next step to follow one transfer at a time. Pink highlights show registers changed by the latest step. The memory table shows when the saved value changes. This is an illustrative order of operations, not a clock-accurate simulation of a real chip.
| Address | Contents |
|---|---|
| 100 | ADD 20 |
| 101 | STORE 21 |
| 20 | 5 |
| 21 | 0 |
Previous step replays earlier model state. It does not reverse a physical CPU.
10 | CONNECT THE JOBS IN YOUR OWN WORDS
| Part of the example | Components interacting | A precise description |
|---|---|---|
| Obtain the instruction | PC, MAR, buses, memory, MDR, IR | The PC supplies an address; the read transfers the instruction through MDR to IR. |
| Interpret it | IR and CU | The CU decodes the instruction in IR to determine the required operation. |
| Read the score | CU, MAR, buses, memory, MDR | The CU coordinates a read of the location selected by MAR, returning its contents to MDR. |
| Add | CU, ALU and AC | Under CU control, the ALU combines the working value and new operand, placing 12 in AC. |
| Save | AC, MAR, MDR, buses and memory | AC supplies 12 to MDR; MAR selects 21; a write stores 12 at that location. |
The fetch, decode and execute cycle is studied in detail in A1.1.5. Here it gives context for the components. Focus on explaining why each transfer is needed, rather than memorising an arrow sequence without knowing what the values mean.
11 | SINGLE-CORE AND MULTI-CORE PROCESSORS
A processor core is an instruction-processing engine within a processor. A single-core processor has one such core; a multi-core processor has more than one. Each core has execution and control resources and its own processing state, although the exact resources and sharing arrangements vary by design.
In a single-core system, several applications can appear active because the operating system switches between tasks. That is not the same as two cores carrying out work simultaneously. A multi-core processor can execute suitable work on different cores at the same time.
For example, one thread might process a frame of a simulation while another handles a different part of the workload. A thread is a sequence of execution within a program. Software and its dependencies determine which work can actually run in parallel.
Four cores do not automatically make every program four times faster. If each step requires the result of the previous step, it cannot simply be split four ways. Coordination and shared-memory access also take time.
Do not confuse “multi-core” with the ALU and CU being two cores. Those are components that cooperate within a core, not two separate complete instruction-processing engines.
SINGLE-CORE
Control + execution + registers
One core executes the scheduled work.
MULTI-CORE
Its own execution state
Its own execution state
Suitable work can run concurrently on separate cores. Some resources may be shared.
12 | CO-PROCESSORS: SPECIALISED HELP
A co-processor assists the main processor with a particular kind of work. The CPU coordinates the wider program while suitable specialist operations are delegated to that processing resource. Depending on the design, the specialist unit may be integrated with or separate from the main processor.
A graphics processing unit can serve as a co-processor for graphics or suitable parallel calculations. Other examples include specialist mathematical or cryptographic processing units. A co-processor is defined by its supporting role, not simply by being “the second CPU core”.
Consider a visual simulation. The CPU can handle program decisions and prepare work while a graphics processor performs suitable graphics calculations. Inputs or commands must be supplied to the specialist, and its results or completion must be coordinated with the rest of the program.
This differs from multi-core processing: multiple general-purpose cores provide additional instruction-processing engines, whereas a co-processor provides specialist assistance. Not every task benefits from delegation because transfer and coordination have costs. A1.1.2 explores the GPU in more detail.
13 | AVOID THESE COMMON CONFUSIONS
| Confusion | Correction |
|---|---|
| The CU calculates the sum. | The CU coordinates; the ALU performs the arithmetic. |
| MAR holds the value read from RAM. | MAR holds the address; MDR holds the transferred contents. |
| PC holds the current instruction. | PC holds the next instruction address; IR holds the current instruction. |
| The data bus carries only ordinary program data. | Instructions also travel on it. |
| A result in AC is automatically saved in main memory. | A suitable store operation is needed to write it to memory. |
| A multi-core CPU guarantees proportional speed-up. | The workload, dependencies and coordination limit the benefit. |
| A co-processor is another name for an extra general-purpose core. | It assists with a specialist class of work. |
14 | DESCRIBE THE INTERACTION, NOT JUST THE NAME
If asked to describe the components, give a clear account of their functions. If the question also asks about interactions, link them with specific transfers and operations. Naming PC, MAR and MDR without saying what they do is incomplete.
A useful response pattern is: component → value or action → destination or purpose. For example: “The MAR holds the selected memory address, which is sent along the address bus so the required location can be accessed.”
For the addition, extend beyond “the ALU adds”: “The CU directs the operation, the operand is read from memory through MDR, and the ALU adds it to the working value, leaving the result in AC.”
Try drawing the CPU, memory and buses from memory. Label every arrow with either an address, a value or a control action. Then explain the difference between a second core and a specialist co-processor to a partner.