Two's complement of 8
The 8-bit two's complement of 8 is 11111000, the bit pattern that represents -8 (minus 8). Written as a signed 8-bit number, 8 itself is 00001000.
Invert and add 1
Here is the two's complement of 8 at 8 bits, step by step (invert the bits of 8 and add 1):
- Write 8 in 8-bit binary:
00001000. - Invert every bit (the one's complement):
11110111. - Add 1:
11111000.
8 at 4, 8, and 16 bits
| Width | 8 as a signed number | Two's complement of 8 |
|---|---|---|
| 4-bit | — | 1000 |
| 8-bit | 00001000 | 11111000 |
| 16-bit | 0000000000001000 | 1111111111111000 |
A dash means 8 (or its negation) is outside that width's signed range: 4-bit two's complement holds -8 to 7, 8-bit holds -128 to 127, and 16-bit holds -32768 to 32767.
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 8?
The 8-bit two's complement of 8 is 11111000, the bit pattern for -8. You get it by writing 8 in binary (00001000), inverting every bit (11110111), then adding 1.
How do you write 8 in two's complement?
8 in 8-bit two's complement is 00001000. Positive numbers are identical to plain binary, so no inverting is needed. At 16 bits it is 0000000000001000.
What is 8 in 16-bit two's complement?
8 in 16-bit two's complement is 0000000000001000. 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.