1.1.1 - Purpose of the CPU Flashcards
Define what is meant by a computer.
A computer is an electronic device which takes input, processes data and delivers output.
Define what is meant by a computer program
A computer program is a set of instructions computers follow to process data.
What does the memory of a computer store
The memory of a computer stores the program
What is the purpose of the CPU
The purpose of the CPU is to fetch, decode and execute instructions.
What happens during the fetch stage
During the fetch stage,
The Program Counter is checked as it holds the address of the next instruction to be executed.
This address is used by the Memory Address Register (MAR) in order to fetch the instruction needed from Main Memory (RAM) and bring it (back) into the Memory Data Register (MDR).
The address in the Program Counter is incremented to point to the next instruction
What happens during the decode stage
During the decode stage, the Control Unit (CU) decodes the instruction to see what has to be done
What happens during the execute stage
The CPU carries out the instruction.
What the CPU actually does, depends on what the instruction is:
e.g. The CPU could be asked to head back to Main Memory (RAM), fetch some data and add it to the accumulator
The CPU could be asked to jump to another instruction.
The CPU could be asked to write data held in the accumulator back into Main Memory (RAM)
This could be:
load data from memory
Write data to memory
Do a calculaotion or logical operation (using the ALU)
Change the address in the PC,
Halt the program
Give another name for the CPU
The processor
What does CPU stand for?
Central Processing Unit