Agilysys interview question

convert binary to hexadecimal without using defined function