169k views
3 votes
What is the range of addresses for a conditional branchinstruction in MIPS

with respect to X, where X contains the address of the branchinstruction?

1 Answer

4 votes

Answer:

MIPS processors use size-fixed instructions where each command word is a word (i.e. 4 bytes = = 32 bits). So there is only so much data that can be squeezed into those four bytes.

The counter of the program is 32 bit. Therefore, the address must be 32 bit.

The address field in instruction for conditional branches is 16 long.

Therefore the complete address range is 65536 (2 ^ 16) ± Program counter.

User Fnery
by
5.8k points