Two's complement of -1
The number -1 in 8-bit two's complement is 11111111. You get it by taking the two's complement of 1: write 1 in binary as 00000001, invert every bit to 11111110, then add 1. Applying the two's-complement operation to -1 negates it back to 1 (00000001).
Invert and add 1
Here is how -1 is written in 8-bit two's complement, step by step. You take the two's complement of the magnitude 1:
- Write 1 in 8-bit binary:
00000001. - Invert every bit (the one's complement):
11111110. - Add 1:
11111111.
-1 at 4, 8, and 16 bits
| Width | -1 as a signed number | Two's complement of -1 |
|---|---|---|
| 4-bit | 1111 | 0001 |
| 8-bit | 11111111 | 00000001 |
| 16-bit | 1111111111111111 | 0000000000000001 |
The most significant bit is the sign: 0 for non-negative, 1 for negative. Widen a value by copying that sign bit to the left (sign extension), which is why 11111111 keeps the same value at every width.
Convert any number
Two's complement is how computers store signed integers, so one adder can both add and subtract. Read the full two's complement lesson, or convert any value at 8, 16, or 32 bits with the two's complement calculator.
Want to see two's complement do real work? Open the lab and wire a subtractor from an adder and inverters, or follow the free course from a transistor up to an 8-bit CPU.
Open the two's complement calculator →Frequently asked
What is the two's complement of -1?
Applying the two's-complement operation to -1 negates it to 1 (00000001 in 8-bit binary). The pattern 11111111 is how -1 itself is stored in 8-bit two's complement.
How do you write -1 in two's complement?
-1 in 8-bit two's complement is 11111111: write 1 as 8-bit binary, invert the bits, and add 1. At 16 bits it is 1111111111111111.
What is -1 in 16-bit two's complement?
-1 in 16-bit two's complement is 1111111111111111. Two's complement sign-extends a shorter value by copying the sign bit to the left, so the value is unchanged from its 8-bit form.