Denary to Negative Binary Conversion
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.
Start with positive 58. Using the place values, 58 = 32 + 16 + 8 + 2, so 58 is 00111010.
| Step | 8-bit pattern |
|---|---|
| 1. Positive 58 in binary | 00111010 |
| 2. Flip every bit | 11000101 |
| 3. Add 1 | 11000110 |
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.
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.
Edexcel GCSE Computer Science · Denary to Negative Binary Conversion