wants it to have values a=1 b=2 c=3.
To make f('a') = 1 do this: subtract 'a' and add 1
'a' - 'a' + 1 = 1
'b' - 'a' + 1 = 2
etc
Are you confusing the hexidecimal values of hex digits with the values of chars?
The hex digit A represents the int value 10, B is 11 etc through F = 15
The int value of 'A' is 65