Two's complement of 0
The two's complement of 0 is 00000000. Zero is the only number that is its own two's complement: inverting every bit gives 11111111, and adding 1 carries off the top and wraps back to 00000000.
Invert and add 1
Here is the two's complement of 0 at 8 bits, step by step (invert the bits of 0 and add 1):
- Write 0 in 8-bit binary:
00000000. - Invert every bit (the one's complement):
11111111. - Add 1:
00000000.
0 at 4, 8, and 16 bits
| Width | 0 as a signed number | Two's complement of 0 |
|---|---|---|
| 4-bit | 0000 | 0000 |
| 8-bit | 00000000 | 00000000 |
| 16-bit | 0000000000000000 | 0000000000000000 |
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 00000000 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 0?
The two's complement of 0 is 0 (00000000). Zero is the only value that is its own two's complement, because inverting all zeros gives all ones and adding 1 wraps back to zero.
How do you write 0 in two's complement?
0 in 8-bit two's complement is 00000000. Positive numbers are identical to plain binary, so no inverting is needed. At 16 bits it is 0000000000000000.
What is 0 in 16-bit two's complement?
0 in 16-bit two's complement is 0000000000000000. 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.