Processor components

At GCSE we learned that a processor has an arithmetic logic unit (ALU), a control unit and a system clock.



Registers

General purpose registers

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.



Dedicated registers

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

Fetch-decode-execute

Fetch



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.

Fetch



The instruction is sent to the memory buffer register on the data bus. At the same time the program counter is incremented.

Fetch



The instruction is copied from the memory buffer register to the current instruction register.

Decode



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.

Execute



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.

Knowledge check


Questions:
Correct:

Question text


© All materials created by and copyright S.Goff