Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assuming integers are represented as 32-bit words and negative numbers are repre

ID: 3747263 • Letter: A

Question

Assuming integers are represented as 32-bit words and negative numbers are represented using the 2's complimentary method convert the following decimal numbers to hexadecimal numbers (show your work).

a. -1993, b. 2031

Explanation / Answer

a) -1993 1) convert 1993 to binary first 1993 in binary is => 00000000000000000000011111001001 2) Flip all the bits 00000000000000000000011111001001 is flipped to 11111111111111111111100000110110 3) Add 1 to the above result 11111111111111111111100000110110 + 1 => 11111111111111111111100000110110 4) convert this to hexadecimal 1111 1111 1111 1111 1111 1000 0011 0110 => 0xFFFFF836 Answer: 0xFFFFF836 b) 2031 1) convert 2031 to binary 2031 in binary is => 00000000000000000000011111101111 since this is positive. this itself is the answer. Just convert it to hexadecimal 2) convert this to hexadecimal 0000 0000 0000 0000 0000 0111 1110 1111 => 0x000007EF Answer: 0x000007EF