Binary subtraction is similar to subtracting numbers in decimal. If you are going to be working with the binary number system often then it is useful to be able to subtract binary numbers. To make it easy there are four simple rules we can remember:
However, Rule 4 is where it gets a bit tricky, here we can state:
We have to remember here that when using this rule when subtracting large binary number for each other that we might need to borrow one digit from a higher order to complete our binary subtraction.
The best way to learn how to subtract binary numbers is through some worked examples. Follow along with our two worked examples below to improve your binary subtraction skills.
In the below example we subtract 7 (111) and 2 (10) together in binary. This is an easy example as it does not include any borrowing:
In the below example we subtract 10 (1010) and 5 (111) together in binary. This is a harder example as it includes borrowing:
The below image contains some examples of binary subtraction.