Subtraction in binary works in a similar nature to subtraction in denary. Like addition there are 4 possible subtractions for a single digit -

0 - 0 = 0

1 - 0 = 1

1 - 1 = 0

0 - 1 = Need to borrow from the previous digit.

When a value is borrowed you need to find the next available one. You then need to invert all of the bits. Look at the example below -

The last 1 on the top row becomes our borrow digit. We then invert all of the digits up till the bowwow digit. Now we can simply continue with the subtraction as before. Below is another example

 

When a borrow occurs the digit you write down as the answer will always be a one. Here are two more examples to look at. See if you can arrive at the same answers.