Skyworks Solutions interview question

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