Menu

Denary to Negative Binary Conversion

Negative Denary: Flip Method

To write a negative denary number in 8-bit two's complement, convert the positive version of the number to binary, flip every bit, then add 1. This is the flip method, and it works for any negative value from -1 to -128.

The three steps

  1. Write the positive number in 8 bits. Ignore the minus sign, convert the number to binary and pad it with leading zeros so it is exactly 8 bits long.
  2. Flip every bit. Each 0 becomes 1 and each 1 becomes 0, including the leading zeros.
  3. Add 1. Add 1 to the flipped pattern in binary, carrying where 1 + 1 makes 10, and keep the answer to 8 bits.

Worked example: -58

Start with positive 58. Using the place values, 58 = 32 + 16 + 8 + 2, so 58 is 00111010.

Step8-bit pattern
1. Positive 58 in binary00111010
2. Flip every bit11000101
3. Add 111000110

In step 3 the rightmost bit is 1, so 1 + 1 gives 0 carry 1. The carry goes into the next column, where 0 + 1 gives 1, and every other bit stays as it is. So -58 is 11000110.

Check your answer

A negative number always starts with 1, so if your answer starts with 0 something has gone wrong. To be sure, add up the two's complement place values where there is a 1, remembering that the leftmost bit is worth -128: -128 + 64 + 4 + 2 = -58.

Another one to try: 100 is 01100100, which flips to 10011011, and adding 1 gives 10011100. Check: -128 + 16 + 8 + 4 = -100.

Practise this