digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksToolsOpen the lab →

Two's complement of 6

The 8-bit two's complement of 6 is 11111010, the bit pattern that represents -6 (minus 6). Written as a signed 8-bit number, 6 itself is 00000110.

Two's complement of 6 (8-bit)11111010

Invert and add 1

Here is the two's complement of 6 at 8 bits, step by step (invert the bits of 6 and add 1):

  1. Write 6 in 8-bit binary: 00000110.
  2. Invert every bit (the one's complement): 11111001.
  3. Add 1: 11111010.

6 at 4, 8, and 16 bits

Width6 as a signed numberTwo's complement of 6
4-bit01101010
8-bit0000011011111010
16-bit00000000000001101111111111111010

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 00000110 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 6?

The 8-bit two's complement of 6 is 11111010, the bit pattern for -6. You get it by writing 6 in binary (00000110), inverting every bit (11111001), then adding 1.

How do you write 6 in two's complement?

6 in 8-bit two's complement is 00000110. Positive numbers are identical to plain binary, so no inverting is needed. At 16 bits it is 0000000000000110.

What is 6 in 16-bit two's complement?

6 in 16-bit two's complement is 0000000000000110. 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.