Menu

Unsigned Binary to Negative Binary Conversion

Two's Complement to Denary

An 8-bit two's complement pattern that begins with a 1 in the most significant bit (the sign bit) stands for a negative number. To turn it into denary, use flip the bits and add one: change every 0 to a 1 and every 1 to a 0, add 1 to what you get, read that as the positive size, then put a minus sign in front.

The steps in order

  1. Check the leftmost bit is 1, so the value is negative.
  2. Flip all eight bits, not just some of them.
  3. Add 1 to the flipped pattern, working from the right-hand end.
  4. Read the result as an ordinary unsigned value.
  5. Write that value with a minus sign.

A worked example

Take 11011001.

  • Flip it: 00100110
  • Add 1: 00100111
  • Read it: 32 + 4 + 2 + 1 = 39
  • So 11011001 represents -39.

11011001 flipped to 00100110, then 1 added to give 00100111, read as 32 + 4 + 2 + 1 = 39, and the minus sign added to give -39.

Stopping at 39 gives a positive answer, which is wrong: the pattern stores a negative value, so the minus sign is part of the answer, not an optional extra. Nor is the sign bit a marker sitting outside the number. It is a real bit with a place value of -128, which is why any pattern starting with 1 is worth less than zero.

The same two steps work the other way round: to find the pattern for a negative denary value, write its positive size in binary, flip every bit and add 1. Converting each way is a mirror image of the other, so the method never changes.

Practise this

Edexcel GCSE Computer Science · Unsigned Binary to Negative Binary Conversion