twoscomplementencoding
nounA way computers store numbers so they can add and subtract easily, even negative ones.
The programmer used twoscomplementencoding to store negative numbers in the computer's memory.
SYNONYMS
OTHER MEANINGS
2. A method of representing signed integers where the most significant bit indicates the sign and negative values are formed by inverting bits and adding one.
In twoscomplementencoding, the number -1 is stored as all ones in binary.
3. A hardware-friendly number format that lets addition and subtraction use the same circuit.
Because of twoscomplementencoding, the CPU needs only one adder for both positive and negative numbers.
4. A convention in digital systems for wrapping around values when they exceed their range.
With twoscomplementencoding, adding one to the largest positive number wraps to the smallest negative number.