01000000
-00010000
=
00110000 = 0.5 + 0.25 = 0.75
rules:
1-0 = 1
1-1=0
0-1 = 1 with a borrow (all zeros upstream become 1 until first 1 hit which becomes 0), if there are no ones upstream, the overflow flag is set (overflow/borrow).
01000000
-00010000
=
00110000 = 0.5 + 0.25 = 0.75
rules:
1-0 = 1
1-1=0
0-1 = 1 with a borrow (all zeros upstream become 1 until first 1 hit which becomes 0), if there are no ones upstream, the overflow flag is set (overflow/borrow).
Ah, thanks! Its the 0-1 that is confusing me... but if I had to do 0.25-1 then wouldnt that be: 11010000? but that is not -0.75, it gives me -1.25? is that because there is overflow?
with the sign bit as bit 7, you don't use a '1' for the bit, you use a zero, so a -1 would look like 10111111,
so .25 plus - 1 would look like:
00010000
10111111
and adding them, you'd get:
11001111
which is -.75
for instance, if you don't imply the decimal, a 1 looks like 00000001, a zero 00000000, and minus one 11111111 (the next one below zero), and minus two 11111110, minus three 11111101, etc... it's called sign bit extension for negative numbers