What hex number would you add to 0 times 58 to set the ZERO flag? _____ What hex
ID: 3850416 • Letter: W
Question
What hex number would you add to 0 times 58 to set the ZERO flag? _____ What hex number would you add to 0 times 58 to set the OVERFLOW flag? _____ For 7.a perform an arithmetic right shift and for 7.b a logical right shift. Show decimal after the shift. a. 0 times 8F SAR:: hex: _____ decimal: _____ b. 0 times 8F SHR:: hex: _____ decimal: _____ Given 7 bits: a. How many possible values can be represented? b. What is the unsigned range of values? c. What is the signed range of values if it represented a twosExplanation / Answer
6.) In order to make zero flag set we need to add 0xA8 that will make the result 0x00 with carry 1.
7.) On addition, 0xA8 also set overflow flag.
8.) a.) Arithmetic right shift of 0x8F results in 0xC7 which is 199 in decimal.
b.) Logical right shift of 0x8F results in 0x47 and in decimal, it is equivalent to 71.
9.) a.) With 7 bits, we can represent 2^7 = 128 values.
b.) Unsigned range: 0 to 127
c.) 2's complement range: -64 to 63
Hope it helps, feels free to comment in case of any query.
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.