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.
Example:
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 3 from 11 and then 1 from 1. The results will be 8
Problem:
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 1-3=-2??
UPDATE
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?
There's more than one way to get to an answer. The borrowing method is just one method.
As it happens, the borrowing method isn't particularly useful for $1-3$. (We have nothing to borrow from!) So we use another method.
On thing we can do is notice that: $$(1-3)+(3-1)=0$$ (Just remove the parentheses. Everything cancels.) Now, any two things that add up to zero are opposites of each other! That means that $(1-3)=-(3-1)$, or $1-3=-(2)=-2$.
In general, $x-y=-(y-x)$. If you ever have to subtract a large number from a smaller one, just switch them around and put a minus sign in front.