Question
Since writing a long string of binary digits can be tedious, it is often more convenient to use the hexadecimal notation, where a single digit
Since writing a long string of binary digits can be tedious, it is often more convenient to use the hexadecimal notation, where a single digit (a hexit) in the range 0-9 or A-F is used to represent adjacent groups of 4 bits (starting from the right). Give the 8-hexit hex encoding (i.e., this would correspond to 32 bits in binary) for each number below.
Hint 1: For decimal numbers, you can either convert them into binary using the successive division method described in class, make sure it is 32 bits long, and then convert binary to hex, by grouping four bits at a time, from right to left. Or, convert decimal directly into hex using successive division by 16.
Hint 2: For negative numbers, assume 2's-complement representation is used. First convert the positive decimal value to a binary number, making sure it is 32 bits long. Then negate the binary number by computing its 2's-complement. Finally, convert the 2's-complement to hex by simply grouping four bits at a time from the right to the left.
Each answer must have exactly 8 hexits, which corresponds to 32 bits in binary. If the actual value seems to have fewer than 32 bits in binary, you must first appropriately pad additional bits to its left to make it 32 bits long. For positive values, '0's are padded to the left; for negative values, '1's are padded to the left. This is called "sign extension". Any padded '1' will also show up in the hex value when you convert binary to hex by grouping four bits at a time. For example, if after sign-extension, eight ones appeared in the leftmost part of the number (i.e., '11111111 ...'), then its hex representation will start with 'FF ...'. So, the value -1 would be 32 ones in binary, and therefore 'FFFFFFFF' in hex. You will receive no credit if your answer does not include exactly 8 hexits (including any leading zeros).
a) 6753 = 0x (Enter 8 hexits)
b) -38700 = 0x (Enter 8 hexits)
c) 0000 0000 0000 0000 1001 1101 0110 1010 = 0x (Enter 8 hexits)
d) 1111 1111 1111 0110 1011 0111 0101 0001 = 0x (Enter 8 hexits)
e) -100 = 0x (Enter 8 hexits)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started