merge bin2hex into hex2bin