two's complement

"Two's complement" is a widely used method in computing for representing signed integers in binary form.

πŸ‡ΊπŸ‡Έ US Voice:
πŸ‡¬πŸ‡§ UK Voice:

Definition

C1Digital Systems

(technical)A binary representation method where the most significant bit indicates the sign, with 0 for positive and 1 for negative numbers.

Example

  • In two's complement, the binary number 10000001 represents -127.

C1Binary Arithmetic

(technical)A technique for encoding signed integers by inverting all bits of a number and adding one to the result.

Example

  • To find the two's complement of 5 in 8-bit binary, invert the bits of 00000101 to get 11111010, then add 1 to get 11111011.

C1Computer Science

(academic)A method that simplifies binary arithmetic operations by allowing the same circuits to handle both signed and unsigned integers.

Example

  • Using two's complement, the addition of positive and negative binary numbers can be performed using the same hardware.

Similar

Terms that have similar or relatively close meanings to "two's complement":

ones' complement