Two's complement: Difference between revisions - Wikipedia


Article Images

Content deleted Content added

Tag: Reverted

Line 26:

For example, to calculate the [[decimal]] number '''−6''' in binary from the number '''6''':

* Step 1: ''+6'' in decimal is ''0110'' in binary; the leftmost significant bit (the first 0) is the [[Sign (mathematics)|sign]] ''(just 110 in binary'' would be -26 in decimal).

* Step 2: flip all bits in ''0110'', giving ''1001''.

* Step 3: add the place value 1 to the flipped number ''1001'', giving ''1010''.