help with assmebly code 2) unsigned and sign extension a. 8-bit to 16-bit unsign
ID: 3595708 • Letter: H
Question
help with assmebly code
2) unsigned and sign extension a. 8-bit to 16-bit unsigned number conversion Input 8 bits unsigned number (for example, hexadecimal of fd) and convert this value to the identical value with 16-bit, show before and after the converted hexadecimal information and decimal information 8-bit to 16-bit signed number conversion b. Input 8 bits signed number (for example, hexadecimal of fd) and convert this value to the identical value with 16-bit, show before and after the converted hexadecimal information and decimal information 8-bit to 32-bit unsigned number conversion - Input 8 bits unsigned number (for example, hexadecimal of fd) and convert this value to the identical value with 32-bit, show before and after the converted hexadecimal information and decimal information 8-bit to 32-bit signed number conversion c. d. Input 8 bits signed number (for example, hexadecimal of fd) and convert this value to the identical value with 32-bit, show before and after the converted hexadecimal information and decimal informationExplanation / Answer
2
a. Unsigned 8 bits to 16 bits
8 bits = fd = 1111 1101
16 bits = 00fd = 0000 0000 1111 1101 = 00fd = 253 in decimal
b. signed 8 bits to 16 bits
8 bits = fd = 1 111 1101
most significant bit is 1 so number is negative, so repeat the most significant bit ie 1 for extended 8 bits
16 bit = 1111 1111 1111 1101 = fffd = 65533 in decimal
c. Unsigned 8 bits to 32 bits
8 bits = fd = 1111 1101
32 bits = 0000 0000 0000 0000 0000 0000 1111 1101 = 000000fd = 253 in decimal
d. Signed 8 bits tp 32 bits
8 bits = fd = 1111 1101
most significant bit is 1 so it is a negative number make all extended bits to 1
1111 1111 1111 1111 1111 1111 1111 1101
fffffffd = 4294967293 in decimal
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.