Search code examples
mathbinarysubtraction

What is the rule of multiple borrowing in binary subtraction?


11000 - 111 = 10001

Below is the procedure, it seems that when doing a multiple borrowing, the value of a borrowed position will never change?

So, for instance, in this example, when doing this subtraction, the last '0' will need to borrow from a 1, finally it find a '1' as the second '1', and this second '1' just like a big fan of propagation-animal and feed all the 0 behind with 10?

Is this the rule?

A '1' can fill all the following '0' with '10'?

enter image description here


Solution

  • the '1' does not fill all the following 0's with '10'

    1100 becomes 1 0 '10' 0 0

    that can then become 1 0 1 10 0 [as 10 - 1 = 1 in binary]

    this then becomes 1 0 1 1 10

    now 1 0 1 1 10

    . - 0 0 1 1 1

    will be 1 0 0 0 1

    it acts similar to regular subtraction