here's a reference.
http://www.numbernut.com/arithmetic/subtract-borrow.html
here's how to do it in your problem.
thousands hundreds tens units
1 0 0 0
minus 3 4 7
you start by subtracting 7 from 0 in the units column.
you can't do it because 7 is greater than 0.
you borrow a digit from the tens column.
you can't because the tens column is 0.
you go to the tens column and borrow a digit from the hundreds column 0.
you can't because the hundreds column is 0.
you go to the hundreds column and you borrow a digit from the thousands column.
the thousands column becomes 0 and the hundreds column becomes 10 because each succeeding digit on the left is 10 times the value of the digit on the right.
your numbers become:
thousands hundreds tens units
0 10 0 0
minus 3 4 7
now you go to the tens column and borrow a digit from the hundreds column.
your numbers become:
thousands hundreds tens units
0 9 10 0
minus 3 4 7
now you go to the ones column and borrow a digit from the tens solumn.
your numbers become:
thousands hundreds tens units
0 9 9 10
minus 3 4 7
now you can do your subtraction.
starting from the units column: 10 minus 7 = 3.
next to the tens column: 9 - 4 = 5
next to the hundreds column: 9 - 3 = 6
your number becomes 653 as shown below:
thousands hundreds tens units
0 9 9 10
minus 3 4 7
result 6 5 3