What are CPU registers?
Fast access pieces of memory written within the processor.
What are the two types of CPU registers?
General purpose registers
Dedicated / special purpose registers
What do general purpose registers do?
Used in the ALU to temporarily store the results of the intermediate calculations that are produced as part of a larger calculation.
What are special dedicated purpose registers used for?
Their used in the fetch execute cycle as each has a specific role to play in each phase of the cycle.
What are all the registers in the Fetch Execute cycle?
Program counter (PC)
Current instruction registers (CIR)
Status register (SR)
Memory address register (MAR)
Memory data register (MDR)
Accumulator
What does the program counter (PC) do?
Holds the address of the next instruction to be executed by the P.
What does the current instruction register (CIR) do?
Holds the current instruction that the P is executing.
What does the Status register (SR) do?
Used to store information about the result of the last instruction that the ALU executed.
Each bit within the status register acts as a flag to indicate if an error or exception has occurred within the process, or to enable or disable interrupts to be raised.
What does the Memory address register (MAR) do?
Temporarily holds the address of the M location (in main M) that the P needs to access, either to read from (i.e. load data) or write (i.e. store data) to.
What does the Memory Data Register (MDR) do?
Temporarily holds the data (data values or instructions) that are read or written to the main M.
What does the accumulator do?
Stores the results of ANY calculation in the ALU.
What is an error or exception (CPU registers)?
An error or exception is when the result of a calculation requires further action. For example, it signifies if the result of a calculation is negative or zero, or if a calculation produced an overflow.
What is an interrupt (CPU registers)?
An interrupt is an event outside of the program process that requires the attention of the processor. For example, indicating a hardware malfunction.