Assembly Language Programming 0 pt) Compute the following subtraction by convert
ID: 3901983 • Letter: A
Question
Assembly Language Programming 0 pt) Compute the following subtraction by converting the 2d negative number into a 2's mplement number followed by an addition. Write the answers in hexadecimal. 0x7AA7 + (-0xA7A7) (10 pt) Suppose that the data segment starts at the address of 0x00008080, which is also the address of label 'array. What is the value of the register in each of comment fields below after the corresponding instruction on the left has completed execution? data .word array OxFFFFFFFC, -16, 0x10, 0xFFFFFFF8,-7 .text la $t9, array lw Sto, 8(St9) lw Sti,array+16(Sto) # St1- add $t2, St0, Stl # $12 =Explanation / Answer
0x7AA7 = 0111 1010 1010 0111
0xA7A7 = 1010 0111 1010 0111
1's compliment of 0xA7A7 = 0101 1000 0101 1000
2's compliment of 0xA7A7 = 0101 1000 0101 1001
0x7AA7 = 0111 1010 1010 0111
Adding the both = 1101 0011 0000 0000
Since the MSB is negative the number is negative
1's compliment the number will get the result
-0x2D00
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.