You cannot do what you are trying to do. There is no direct correspondence between some number of bits and a decimal digit.
With hexadecimal, every 4 bits corresponds to exactly 1 hex digit. That is why hex is used for computers.
One hex digit represents exactly 4 bits. Every time you add another hex digit, you add 4 bits.
Two hex digits corresponds to ...