Question: Mips Assembly language ( Kann CH 7 , for reference ) . 2 ) In section 7 . 8 . 3 , it was said

Mips Assembly language ( Kann CH7, for reference).
2)In section 7.8.3, it was said that a branch could access addresses that were -8191...8192
distance from the current $pc. However, the 2's complement integer has values from
-8192...8191.
Why the discrepancy between the value of the 2's complement integer and the size of the branch?
In section 7.8.3, it was said that a branch could access addresses that were -8191...8192
distance from the current $pc. However, the 2's complement integer has values from
-8192...8191.
Why the discrepancy between the value of the 2's complement integer and the size of the
branch?
TIP for Question 2: We are finding the range of addresses we can possibly branch from $PC. The range we get when using two's complement is -8192 to 8191 but the range we can address is shifted by 1(-8191 to 8192). The range has shifted 'forward' by one instruction. Remember we are trying to find an offset/branch from our current instruction...what has happened to $PC while we are executing our current instruction?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!