I have to add two numbers using IEEE754: -14.1875 and -7.4375.
I managed to convert them to half-precision numbers in IEEE754:
1 10010 1100011000 (-14.1875)
1 10001 1101110000 (-7.4375)
As the exponent is different, I corrected the second number so it would have the same exponent as the first number (by shifting the mantissa by 1 position to the right):
1 10010 (0,) 1110111000
Now it seems that I should somehow get this result:
1 10011 0101101000 (-21.625)
I don’t really understand how I should work with exponents — I had 10010 and 10001 and somehow should get 10011 in the result. Adding up to that, directly summing mantissas (
0,1110111000, in two’s complement gives me the result of
0,0010100000, which I do not see how correlates to
0101101000. Could anyone explain to me how do I perform the final step of calculations?