Convert a decimal value in char to hex and store in the char

You already know how to do that. You solved this very problem here: