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
Technology Expert
Margaret Rouse
Technology Expert

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.