Denary numbers can be positive and negative. Similarly binary numbers can be both positive and negative. There are two ways in which we can show negative binary values:

- Sign and Magnitude
- Twos complement

What is Sign and Magnitude?

The left hand bit known as the most significant bit is changed to

0 if positive or

1 if negative

for example 37

+/- | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |

and for -37

+/- | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

1 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |

What is twos complement?

Change all the 1s to 0s and all the 0s to 1s and then add 1 to the new binary value

for example -45

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 |

flip

1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |

add one to the right bit

1 | 1 | 0 | 1 | 0 | 0 | 1 | 1 |

-45 = 11010011