To do subtraction in the decimal system we normally use the borrow method. Consider the example problem to the right. Here we must borrow a 10 from the tens column in order to complete the subtraction in the ones column. We move 10 to the ones column and subtract 6. Then we copy down the remaining 20 from the tens column to get our answer of 24. ``` 2(10) 3 0 - 6 2 4```

We can also use the borrow method to do binary subtraction. The basic rules for binary subtraction are listed in the table below.

 Rule 1 Rule 2 Rule 3 Rule 4 ``` 0 - 0 0``` ``` 1 - 1 0``` ``` 1 - 0 1``` ``` 0 - 1 1```

Again we see that the first three rules are similar to their decimal counterparts. The fourth rule, however, needs a little more explanation since it defines how we borrow from another column. Let's look at a simple example to see where this rule comes from. Consider the problem of subtracting 12 from 102.

 To compute the first column, we need to borrow a 1 from the next column. Recall that two 1s generated a carry in addition. If we reverse this process, we can borrow a 1 from the second column and mark two 1s in the first column. ``` 10 - 1``` Once we borrow from the second column, we cross out the 1 and write 0 above it to show this column is now empty. The 1 from the second column is now represented by the two blue 1s in the first column. ``` 1 01 10 - 1``` To solve our subtraction problem, we take 1 away from our group of two blue 1s. This leaves us with a single 1 which we write below the first column. ``` 1 01 10 - 1 1``` After cleaning up our work, we can see that the first column of our answer is identical to Rule 4. Since we must borrow a 1 from the next column, 0 - 1 = 1. ``` 10 - 1 1```

We can apply the rules of subtraction to solve larger subtraction problems in binary. The animation below demonstrates how to subtract the binary numbers 101012 and 11102. Click on the "Start Tutorial" box to view the animation.

Text-only version