Two’s Complement

Why Trust Techopedia

What Does Two’s Complement Mean?

The “two’s complement” in IT is an operation on binary numbers, and a way to record these numbers through mathematical manipulation, to define both positive and negative integers in binary. It has been described by experts as a “binary signed number representation” that has to do with signed and unsigned values for eight-bit binary or other binary numbers.

Advertisements

Techopedia Explains Two’s Complement

Part of the use of the two’s complement has to do with the representation of negative and positive numbers in binary. Traditional binary starts with a zero in the left side of the row of numbers, and changes that to a one to represent the number one. With negative numbers, that process is inverted, so that there is a one on the left-hand side for zero, and it switches to zero for -1.

The two’s complement subtracts the binary number from 2(n) or “two to the nth power.” This complement technique has been used in calculators and computers to manipulate ordinary numbers for various purposes. In the case of the two’s complement, basic mathematical operations like addition and subtraction stay the same.

The two’s complement was used by John von Neumann in his writing on the historic EDVAC and EDSAC computers in the 1950s. It has been a time-honored way to deal with mathematical abstractions and practical enumeration of numbers used for computing purposes.

Advertisements

Related Terms

Margaret Rouse
Editor

Margaret jest nagradzaną technical writerką, nauczycielką i wykładowczynią. Jest znana z tego, że potrafi w prostych słowach pzybliżyć złożone pojęcia techniczne słuchaczom ze świata biznesu. Od dwudziestu lat jej definicje pojęć z dziedziny IT są publikowane przez Que w encyklopedii terminów technologicznych, a także cytowane w artykułach ukazujących się w New York Times, w magazynie Time, USA Today, ZDNet, a także w magazynach PC i Discovery. Margaret dołączyła do zespołu Techopedii w roku 2011. Margaret lubi pomagać znaleźć wspólny język specjalistom ze świata biznesu i IT. W swojej pracy, jak sama mówi, buduje mosty między tymi dwiema domenami, w ten…