A method by which signed integers are represented. The best method for representing signed integers.

  • Nonnegative integers represented the same way as unsigned integers.
  • Negative integers “wrap around”.
  • Avoids 0 having two representations, like Signed-Magnitude
  • In this system you can direct add negative and positive integers and it just works.
Decimal3 Bit 2’s Complement
3011
2010
1001
0000
-1111
-2110
-3101
-4100

Convert Magnitude to 2’s Complement

The process by which a unsigned integer is converted into its signed, negative counterpart:

~x++

Note

Moss’s mnemonic for this is “flipping ink” flip & inc.

01010011 10101100 10101101

See also

1’s Complement NOT