Basic Architecture (Components) (SQA National 5 Computing Science): Revision Note
Exam code: X816 75
Purpose of the processor
What is the purpose of the processor?
The processor (also called the Central Processing Unit, or CPU) is the core part of the computer system that carries out instructions and processes data
It is responsible for executing programs by performing calculations, making decisions, and controlling how data moves between memory and other components
It works closely with main memory and is connected through the data bus and address bus, which carry data and memory addresses between them
The processor is made up of three main components:
Registers
Very small, very fast memory locations inside the CPU
Used to temporarily store values that are being used or produced during a calculation
Examples include:
Accumulator – stores the result of a calculation
Program Counter – stores the address of the next instruction to be executed
Arithmetic Logic Unit (ALU)
Performs arithmetic operations such as addition and subtraction
Performs logical comparisons, such as
<,>, or=For example:
When a program calculates the total cost of flooring, the ALU performs the multiplication and addition
When a program compares two values (such as
stone_A_distanceandstone_B_distance), the ALU carries out the comparison
Control Unit (CU)
Manages and coordinates all the operations inside the CPU
Controls the flow of data and instructions, sending signals to direct how data moves between the CPU, memory, and input/output devices
Responsible for fetching the next instruction from memory and decoding it before execution
Application in program execution
Task | Component responsible | Supporting evidence / example |
|---|---|---|
Performing a calculation | ALU | Carries out mathematical operations such as finding the total cost of flooring or applying a discount |
Comparing values | ALU | Compares data, such as checking which stone is closer to the target |
Temporarily storing results | Registers | Holds results of calculations or temporary data such as a player’s input |
Transferring the next instruction from memory | Control Unit (CU) | Fetches and decodes the next instruction so it can be executed |
Memory locations
What are memory locations?
Memory locations are storage positions inside main memory where the computer keeps data and program instructions while they are being processed
Each memory location is identified by a unique address, which allows the processor to access information quickly and accurately
Purpose of memory locations
Each memory location stores a single piece of data or one instruction
The unique address allows the processor to locate and retrieve that specific data or instruction
During program execution, the Control Unit (CU) uses these addresses to fetch the next instruction or transfer data to and from the processor
This system of addressing ensures that data and instructions are processed in the correct order
Link to the processor
The processor communicates with memory through the address bus (to specify which location to access) and the data bus (to send or receive data)
These buses work together with the Control Unit to manage how data flows between memory and the CPU
Examiner Tips and Tricks
In National 5 exams, you may be asked to describe the purpose of memory locations with unique addresses.
A full-mark answer should include these key ideas:
Memory locations are used to store program instructions and data, and each one has a unique address that allows the processor to access and manage information during program execution.
Buses
What are buses?
Buses are communication pathways that connect the processor (CPU) to main memory and other components
They allow data and instructions to move between different parts of the computer system
You need to know about two key buses:
Bus | Purpose | Direction |
|---|---|---|
Data bus | Transfers data and instructions between the CPU, main memory, and input/output devices | Bidirectional – data can travel both to and from the CPU |
Address bus | Transfers the memory address of where data or instructions are to be read from or written to | Unidirectional – addresses are sent from the CPU to memory or input/output devices |
Worked Example
A financial program is executing code to calculate a customer’s final bill, which involves applying a discount and checking eligibility for a bonus offer.
Identify the computer architecture component primarily responsible for each task listed below
Task | Component Responsible |
|---|---|
1. Performing the subtraction required to calculate the final discounted price. | |
2. Storing the program instructions (the sequence of steps) before they are executed. | |
3. Temporarily holding the initial purchase value input by the user. | |
4. Managing the transfer of the next instruction from its unique numbered storage space. | |
5. Comparing the final discounted price to the minimum spending threshold for a bonus offer. |
[5]
Answer
Task | Correct Answer | Component Type |
|---|---|---|
1. Performing the subtraction. | ALU [1 mark] | Processor Sub-component (Execution) |
2. Storing the program instructions. | Memory Locations [1 mark] | Basic Architecture Component (Storage) |
3. Temporarily holding the purchase value. | Registers [1 mark] | Processor Sub-component (Temporary Storage) |
4. Managing the transfer of the next instruction. | Control Unit (CU) [1 mark] | Processor Sub-component (Control/Transfer) |
5. Comparing the discounted price. | ALU [1 mark] | Processor Sub-component (Comparison) |
Unlock more, it's free!
Did this page help you?