I have been constructing an assembly program based on accepted single characters integers, and converting them into the numerical Hex value. I was curious how scanf() transforms single characters into their integer equivalent from input. I know you can convert by subtracting base value (ascii Hex value of 0 ). Beside using the multiplication method ( seems too slow), is there any other method to combine the single integers?