What is the CPU?
The central processing unit/microprocessor is an integrated circuit on a single microchip made out of billions of transistors (tiny electrical switches) that combine to form logic gates. It fetches, decodes and executes instructions.
It processes data/instructions, performs arithmetic calculations and logical operations. It controls operations and processing of a computer. Responsible for the Fetch-Decode-Execute cycle.
Does not directly carry out input, output or storage functions.
What is the CU?
The control unit coordinates all the activities happening in the CPU and manages the flow of data around the CPU/between the CPU and other devices. Manages the other components (e.g. ALU). Initiates each step of the FDE cycle and is responsible for decoding the instruction in the CIR.
What is the PC?
The program counter is a register that holds the address of the next instruction to be fetched.
Increments by 1 when instruction is fetched.
What is MAR?
Memory address register is a register that contains the current address of the RAM location that data should be written to or read from.
What is the MDR?
Memory data register is a register used to temporarily store data that is read from/written to RAM.
All data going to/from memory must pass through here.
What type of value does a microprocessor use to help it make a decision?
Stored value (compares sensor data to a value stored in memory)
List all the components of the CPU:
What is the ALU?
Arithmetic logic unit.
Carries out arithmetic calculations and logical operations (e.g. bit shifts)
Uses the Accumulator to temporarily store data while performing these calculations.
Only works with integer values.
What is the FPU?
Floating point unit.
Performs arithmetic calculations on non-integer values.
What are registers?
Small, temporary areas of storage within the CPU.
Extremely fast to access because they are located directly within the CPU.
What is the CIR?
The current instruction register stores the instruction which is currently being decoded/executed after it was fetched from memory.
What is the ACC?
The accumulator is a register used to temporarily hold the data being worked on by the ALU/FPU or the result of the final calculation.
What is a bus?
An electronic pathway that components of the CPU use to communicate with each other and RAM.
State the 3 types of buses
Explain an example of the value 50 being written into location ‘10’ in RAM
What is the fetch-decode-execute cycle?
Also known as the stored program concept or the Von Neumann model, it is a cycle that computers follow to run programs.
Fetch - instruction is fetched from RAM to CPU
Decode - instruction is sent from CIR to be decoded by CU, determines what type of instruction it is
Execute - instruction is executed, like an arithmetic calculation or storing result/data in RAM. Usually performed by ALU. Often includes storing results.
Breakdown of fetch stage
What 4 things affect CPU speed?
What does the speed of the CPU affect?
The speed at which the CPU can perform FDE cycles affects its performance.
More cycles completed each second = program running faster
What is an instruction set?
The list of instructions that a CPU can process. When written in binary, it is known as machine code.
What is an embedded system?
A specialized computer system/single microprocessor that performs a single, dedicated function inside another device/appliance (e.g. security system).
Also known as dedicated system.
Limited functionaility but have some advantage over general computers such as : cheaper, increased reliability, simple interface.
What does the CPU access first when it tries to read data from a memory location?
It will first check if it exists in cache memory. If it does, it will access the data from there. If the data does not exist there, it will be accessed from the comparatively slower RAM.