The standard subtraction and addition algorithms work fine in any base. You just have to remember that if you are in base 16, say, and you “borrow one” from the next column, you are borrowing 16, not ...
Absolute value subtraction: Once you’ve got addition working and tested, think about subtraction. The standard algorithm assumes that we’re always subtracting a smaller from a larger. Implement this ...