Question

2.11 Assume that registers X0 and X1 hold the values 0×8000000000000000 and 0×D000000000000000, respectively. 2.11.1 [5]...

2.11 Assume that registers X0 and X1 hold the values 0×8000000000000000 and 0×D000000000000000, respectively.

2.11.1 [5] <§2.4> What is the value of X9 for the following assembly code? ADD X9, X0, X1

2.11.2 [5] <§2.4> Is the result in X9 the desired result, or has there been overflow?

2.11.3 [5] <§2.4> For the contents of registers X0 and X1 as specified above, what is the value of X9 for the following assembly code? SUB X9, X0,

X1

2.11.4 [5] <§2.4> Is the result in X9 the desired result, or has there been overflow?

2.11.5 [5] <§2.4> For the contents of registers X0 and X1 as specified above, what is the value of X9 for the following assembly code? ADD X9, X0, X1 ADD X9, X9, X0

2.11.6 [5] <§2.4> Is the result in X9 the desired result, or has there been overflow?

1 0
Add a comment Improve this question Transcribed image text
Answer #1

2.11.1 [5] <§2.4> What is the value of X9 for the following assembly code? ADD X9, X0, X1

Solution:

X9=X0+X1

¿0x8000000000000000+0x D000000000000000

8+D=15

Thus,X9=0x15000000000000000=(000101010000000000000000000000000000000000000000 00000)

2.11.2 [5] <§2.4> Is the result in X9 the desired result, or has there been overflow?

Solution:

Yes, there has been overflow.An overflow occurs when the results of an arithmetic operation (i.e. addition orsubtraction) produces a result that is too large or too small to store.Overflow occurs when the leftmost retained bit of the binary bit pattern is not the sameas the infinite number of digits to the left (the sign bit is incorrect): a 0 on the left of thebit pattern when the number is negative or a 1 when the number is positive.LEGv8 architecture are all 64 bits in length and the result is 68 bits in length whichmeans there has been an overflow.

Add a comment
Know the answer?
Add Answer to:
2.11 Assume that registers X0 and X1 hold the values 0×8000000000000000 and 0×D000000000000000, respectively. 2.11.1 [5]...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT