Please give detailed problem solving process! Thank you! Convert the numbers int
ID: 3689908 • Letter: P
Question
Please give detailed problem solving process! Thank you!
Convert the numbers into the new base (these are signed integers) assuming that you have 8 bits to represent the number. -125_10 into base 2 and base 16 107_10 into base 2 and base 16 Convert the numbers in part B to their two's complement (same thing as multiplying by -1). Add the values from part B together (ie -127+107) using binary arithmetic. Show that -(-125+107) is equal to the two's complement of the answer in part D. Using 8 bits perform the binary equivalent of: (6 * 7), (-6 * 7), 6/7, 7/6, -6/7Explanation / Answer
1)
-125
we need to calculate 125 in binary and then do 2's complement of the same to get the -125.
125 in binary will be 1111101. reversing the bits we get 000010 and adding 1 to the same we get 0000011.
since it is in 8 bit form the result will be 10000011
Hexadecimal will be 83.
2)
To convert 107 in binary we need to divide it by 2 and keep the reminder. so on successive division we get
1101011
Now to convert it into hex we need to make pairs of 4 so it will be 110 1011
0110 is 6 and 1011 is B
so hexadecimal value will be 6B.
C)
10000011 2's complement will be 01111100 adding 1 to it we get 01111101 which is 125.
1101011 2's complement will be 0010100 adding 1 to it we get 10010101 which is -107.
D)
adding it we get 10000011
01101101
Result will be 11110000
E)
two's complement of the number will be 00001111 +1 = 00010000
which is equivalent
F)
42 will be 00101010
-42 will be 11010110