From this MIT handout on number system:
Decimal subtraction works very similar to decimal addition, the numbers are aligned to the same place values and the algorithm proceeds from right to left. The bottom digit is subtracted from the top digit, and the result written in the place value position in the result. If the top digit is less than the bottom digit, then we must 'borrow' from the next place value position. That means decrementing the top digit in the next significant position and adding the base to the top digit of this position before performing the subtraction. This operation gets even more complicated when there is a ‘0’ in the next significant position.
What confuses me is the second last line in the paragraph. Can someone please explain the meaning of decrementing the top digit in the next significant position and adding the base to the top digit of this position before performing the subtraction.