Assuming an 8-bit register:
00111000 - 01111011 = 10111101
It may appear at first that the difference as expressed is the positive number 189, but it is actually the 2s-compliment form of expressing a negative number. As such, the solution may be extended for any sufficiently large register size, e.g. 16-bit:
1111111110111101
2006-06-23 06:22:25
·
answer #1
·
answered by stellarfirefly 3
·
0⤊
0⤋
It would take both numbers, convert them to binary, compare the two, decide which is greater, subtract the lesser from the greater, append a negative sign, and convert the difference back into a decimal number for your viewing pleasure.
IE, 56-123 = - |123~56|, but the computer would do this in binary.
2006-06-23 02:13:34
·
answer #2
·
answered by bequalming 5
·
0⤊
0⤋
-67
2006-06-22 22:21:08
·
answer #3
·
answered by NotEasilyFooled 5
·
0⤊
0⤋
111000 - 1111011 = negative 1000011
2006-06-23 02:54:35
·
answer #4
·
answered by gabrielwyl 3
·
0⤊
0⤋