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

l. For the two 16 bit values shown below, show what the value truncated to 8 bit

ID: 3806063 • Letter: L

Question

l. For the two 16 bit values shown below, show what the value truncated to 8 bits would be. Also, for each truncated bit pattern, say whether the value of the original 16 bit representation is preserved or not, and explain how you determined youranswer. a. 00000000 1100 001 l (unsigned, that is, interpreted as B2U) i. 8 bit truncated value ii. Does the value change when truncated to 8 bits? iii. How did you decide? b. 1111 1111 0011 1010 (signed, that is, interpreted as B2T) i. 8 bit truncated value ii. Does the value change when truncated to 8 bits? iii. How did you decide?

Explanation / Answer

1. For the two 16 bit values shown below, show what the value truncated to 8 bits would be.
Also, for each truncated bit pattern, say whether the value of the original 16 bit
representation is preserved or not, and explain how you determined your answer.
a. 0000 0000 1100 0011 (unsigned, that is, interpreted as B2U)
i.    8 bit truncated value: 1100 0011.
ii.   Does the value change when truncated to 8 bits?   No.
iii. How did you decide?
   As the Most Significant 8 bits are 0's and as the number is unsigned, it doesn't make
   any difference in truncating leading 0's. The decimal value in both the representations
   is 195.

b. 1111 1111 0011 1010 (signed, that is, interpreted as B2T)
i.    8 bit truncated value: 0011 1010.
ii.   Does the value change when truncated to 8 bits? Yes.
iii. How did you decide?
   As the given number is signed value, and in the 16-bit representation, the Most Significant
   Bit represents a 1, which means it is a negative, and therefore, is a 2's complement of
   positive value. Where as, when truncated to 8-bit representation, the MSB is 0 now,
   which means its a positive number, and should be considered as it is.