Assuming the 8-bit values shown below are signed values (B2T), determine the neg
ID: 3861594 • Letter: A
Question
Assuming the 8-bit values shown below are signed values (B2T), determine the negation, truncation to 4-bit and sign extend to 16-bit for each of the original 8-bit values. Assuming that 12 bits are available to store the relevant operand and the result: a. Show how the compiler can use subtraction and shifting only (that is, no use of multiplication) to determine the result of 19*56, if 19 is the value of a variable, x, and 56 is a constant which is known to the compiler at compilation time. Show the bit patterns of both operands in the multiplication, and explain clearly the steps you follow to determine the result. b. Now show how the compiler can use subtraction and shifting only (that is, no use of multiplication) to determine the result of 19*-56, if 19 is the value of a variable, x, and -56 is a constant which is known to the compiler at compilation time. Show the bit patterns of both operands in the multiplication, and explain clearly the steps you follow to determine the result.Explanation / Answer
Answer 3)
1111 1111 1111 1111
8-bit value Negation of Original Value Trunctaion of 4-bit Sign extend 16-bit 0000 0000 0000 0000 0000 0000 0000 0000 0000 0010 1010 1101 0110 1010 0000 0000 0010 1010 1010 1101 0101 0011 1101 1111 1111 1010 1101 1111 1111 0000 0001 11111111 1111 1111 1111