Improving hex to binary conversion.