write hex to bin