Question: 3 . The MIPS addu instruction performs the same operation as the MIPS add instruction. The only difference is that after the sum is produced,

3. The MIPS addu instruction performs the same operation as the MIPS add instruction. The only
difference is that after the sum is produced, add triggers an exception if a signed overflow
occurs, while addu does not trigger an exception. Both addu and add treat the contents of
registers as twos complement numbers and both perform signed addition.
a)(3) Assume that register $5 contains -579 and register $6 contains +107896. Show, in hex, the
32-bit result produced by the instruction addu $4, $5, $6.
Contents of $4=0x_____________
Is this the correct sum? Explain your answer.
b)(3) Assume that register $5 contains 0x7FFFFFFE and register $6 contains 0x1045. Show, in
hex, the 32-bit result produced by the instruction addu $4, $5, $6.
Contents of $4=0x_____________
Is this the correct sum? Explain your answer.
c)(3) Assume that register $5 contains 2147418112 and register $6 contains 524287. Show, in
hex, the 32-bit result produced by the instruction addu $4, $5, $6.
Contents of $4=0x_____________
Is this the correct sum? Explain your answer.

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 Programming Questions!