Function Of The CPU Flashcards
What is the main purpose of the CPU?
It processes data.
What 3 steps does the CPU follow?
Fetch-decode-execute
What happens during the fetch stage?
In this stage the CPU fetches/collects some data and instructions from storage (RAM) and then stores these in its own temporary memory which are the registers.
For this to happen the address bus is used - the address bus is a piece of hardware- and the address of the next item that the CPU wants is put on this bus.
Data from this area then travels from the RAM to the CPU on another bus - this time called the data bus.
What happens during the decode stage?
The instruction is worked out.
The CPU understands what the instruction which has just been fetched actually means, and begins to prepare for the next step.
What happens during the execute stage?
This is where the actual data processing happens. Instructions are carried out on the data. Once one cycle has finished another begins.
What are the main components of a CPU?
- Control unit
- Cache (memory)
- Arithmetic and logic unit
What are the three main jobs of the control unit?
- It manages and maintains hardware on the computer to ensure that the correct data goes to the correct hardware.
- It manages the input and output signals (ensures they are dealt with correctly)
- It uses clock signals to synchronise the running of the Fetch - Decode - Execute cycle
What is cache?
An extremely small amount of fast memory which is stored inside the CPU.
Cache is much faster than RAM as there is less distance to travel.
What does the ALU do?
- The arithmetic part is where the actual calculations on the data are performed
- The logic part is where the logical operations are dealt with.