Search code examples
mipsinstructionsinstruction-set

Instruction Execution in MIPS


enter image description here

This is an abstract view of the implementation of the MIPS subset showing the major functional units and the major connections between them

Why we need to add the result of (PC+4) with instruction address?

I know that the PC (Program Counter) is a register in a computer processor that contains the address (location) of the instruction being executed at the current time, but i didn't understand why we add the second adder in this picture?


Solution

  • Some of the operations that can be performed by the CPU are 'jumps'. If your operation is a Jump, from the second block you get the address of the new instructions OR the lenght of the jump you have to do.