Two's complement
Two's complement is a mathematical operation on binary numbers, and is an example of a radix complement. It is used in computing as a method of signed number representation.

Two's complement

Section Title:
Table Section Text: Two's complement is a mathematical operation on binary numbers, and is an example of a radix complement. It is used in computing as a method of signed number representation.

Decimal value	Binary (two's-complement representation)	Two's complement (28 − n)2

0	0000 0000	0000 0000

1	0000 0001	1111 1111

2	0000 0010	1111 1110

126	0111 1110	1000 0010

127	0111 1111	1000 0001

−128	1000 0000	1000 0000

−127	1000 0001	0111 1111

−126	1000 0010	0111 1110

−2	1111 1110	0000 0010

−1	1111 1111	0000 0001

Sentence(s)

The positive 4-bit number is 0111 and the negative is 1000.

final_sentence: The positive 4-bit number is 0111 and the negative is 1000.