MIPS Assembly Language Q1 Imagine that you have a branch ins
MIPS Assembly Language.
(Q1) Imagine that you have a branch instruction with an offset equal to 1610 (00000000000100002), and the PC contains the address 3001010
If the branch is taken, which will be the new address stored in the PC?
(a) 30074
(b) 30026
(c) 30030
(d) 30078
Solution
The new content of Program counter will the current address + the offset.
The Address Offset = 1610
Current location of PC = 3001010
Therefore,
When the branch gets executed, The PC will jump to the memory location 30010 + 16 = 3002610.
