so let's say I am trying to subtract 75.442 by 43.646. I have 43.646 = 00101011.1010, and 75.442 = 01001011.0111 from 2's compliment. I got -75.442 = 10110101.1000, by flipping all the bits, then add 1.
So I have:
00101011.1010
+10110101.1000
=11100001.0010
The sign bit is 0, so it is negative.
but 11100001.0010 = 225.125
While 43.646 - 75.442 = -31.796
What am I doing wrong here? Thanks for your help!
Check your calculation:
00101011.1010 + 10110101.1000 = 11100001.0010