Regarding the subtraction and borrowing a digit from upper digits, I know how that works for more than one digit numbers. However, I can not figure out for one digit numbers! It is an obvious thing since we were in school. But I need a mathematically explanation.
What is the result of 21-13?
2 (10^1) 1 (10^0) -1 (10^1) -3 (10^0) ________________________
For the first digit, we know that
1<3, so we have to borrow from the next digit. The next digit is
2*10 and the borrowed value will be 10. Therefore, the first number is changed to
1 (10^1) (10+1) (10^0). Now we are able to subtract
11 and then
1. The results will be
Now assume, we want to find the result of
1-3 with the above mentioned methodology. We know that
0 (10^1) 1 (10^0) -0 (10^1) -3 (10^0) _________________________
We have to borrow a
10 from the second digit but it is
0. There is also no more non-zero digit in the left (all left digits are zero means 0...000001).
So how we reach
According to the comments and answers, borrowing is not a universal method and may fail if there is no 1 in the left. The question now is, what is the universal method for subtraction?