get hex from bin