ok, say we have number 21. difference is 1.

23, difference is -1.

what is a mathematical way, only using the number 23, to get the difference of the digits. If there is no mathematical way, then how do you extract part of an int? i would really like a mathematical way though.