Skip to content

Instruction Processing

Processing Unit

The processing unit consists of:-

  • Control Unit - manages decoding of instructions, as well as IO performed from the processor to registers / memory.
  • (Arithmetic) Logic Unit - manages arithmetic operations, as well as execution of logical / relational operations.
  • Register Files - register files can be read from or written into to persist operation results between instructions.

Instruction Register

The Instruction Register stores the instruction that is currently being executed by the processor. When the processor interprets the opcode, instruction sources, or instruction destinations, it refers to the instruction register for decoding.

Program Counter

The Program Counter stores either the index of either:

  • The instruction currently being executed
  • The next instruction to be executed

Depending upon the implementation of the processor. It can be thought of as a cursor, scrolling to whichever line of the code we're running.