At GCSE we learned that a processor has an arithmetic logic unit (ALU), a control unit and a system clock.
The registers you see in the ALU are general purpose registers. General purpose registers are very fast small storage areas onboard the processor. General purpose registers are also known as accumulators as they can be used to perform mathematical operations. They can also be used to hold interim values during calculations.
There are a number of dedicated registers in a processor that are used to run the processor such as:
Register | Description |
The program counter (PC) | This holds the address of the location in memory of the next instruction |
The current instruction register (CIR) | This holds the current instruction being executed |
The memory address register (MAR) | This holds the address in memory to read or write instructions or data |
The memory buffer register (MBR) | This temporarily stores data and instructions |
Status register (SR) | This is used to indicate an overflow or a negative number |
The program counter holds the address of the next instruction. This is copied to the memory address register and sent to main memory on the address bus. A control signal is sent to main memory to request it to return the contents stored at the memory address.
The instruction is sent to the memory buffer register on the data bus. At the same time the program counter is incremented.
The instruction is copied from the memory buffer register to the current instruction register.
The instruction in the current instruction register is decoded into opcode and operand and the opcode is looked up to see what instruction to carry out. If additional data is needed it will be fetched from main memory and passed to the registers.
The instruction is executed using the ALU if necessary. The result of any calculation is stored in an accumulator or sent via the memory buffer register on the data bus to main memory. If a calculation resulted in an overflow a signal would be sent to the status register.
Question text
© All materials created by and copyright S.Goff