implement hex_to_bin