Pergunta de entrevista da empresa Skyworks Solutions

How would you write a program to convert from binary to hexadecimal?