Converting chars to decimals and vice versa

If i type in A I get back : 10
if i type in B I get back : 11
if i type in C i get back: 12

etc etc..

But If i type in 0-9 i am getting weird numbers, like i type in 5 and get back 1?
And I need to get back 0 the digit.
so I need to be able to put in a 1 and get back 1/
put in a 2 and get back 2.
etc etc