There are a few approaches to representing negative numbers

- Signed bit
- One’s complement
- Two’s complement

## Signed Bit

Just reserve the last bit (most significant) to represent the sign.

1111 | -7 |

1110 | -6 |

1101 | -5 |

1100 | -4 |

1011 | -3 |

1010 | -2 |

1001 | -1 |

1000 | -0 |

0000 | 0 |

0001 | 1 |

0010 | 2 |

0011 | 3 |

0100 | 4 |

0101 | 5 |

0110 | 6 |

0111 | 7 |

### Con’s

- Has two 0’s (positive 0 and negative 0)
- Does correctly handle addition and subtraction between positive and negative

## 1’s Complement

To get one’s complement, take the complement of the positive representation of the number. In other words, flip all the bits of positive representation to get the negative representation.

1000 | -8 |

1110 | -7 |

1010 | -6 |

1011 | -5 |

1100 | -4 |

1101 | -3 |

1110 | -2 |

1111 | -1 |

0000 | 0 |

0001 | 1 |

0010 | 2 |

0011 | 3 |

0100 | 4 |

0101 | 5 |

0110 | 6 |

0111 | 7 |

### Con’s

- Has two 0’s (positive 0 and negative 0)
- Off by 1 errors due to the negative 0

## 2’s Complement

Same as 1’s complement expect it removes negative 0.

1000 | -8 |

1110 | -6 |

1010 | -5 |

1011 | -4 |

1100 | -3 |

1101 | -2 |

1110 | -1 |

1111 | -0 |

0000 | 0 |

0001 | 1 |

0010 | 2 |

0011 | 3 |

0100 | 4 |

0101 | 5 |

0110 | 6 |

0111 | 7 |

To negate (~) in two’s complement:

Negate and than add 1