negation
Changing a number's sign; in two's complement, flip every bit and add 1.
Two's-complement negation maps x to (~x + 1) mod 2^n; the most negative value is its own negation.
Examples
Negating 6 (
00000110) in 8 bits gives11111010, which is −6. Negating −128 gives −128 again.
See also