Well, the easiest way to convert a single character to a number, 0 to 9, (if you're SURE it's a number) is to subtract '0' from the character. Since, in ASCII, all of the numbers are in order, when you subtract the numeric representation of the character '0', you'll get 0 if the character is '0', 1 if the character is '1', and so on. From there, you can multiply the higher characters by multiples of 10 and add them together to get a final, multidigit number.