Sollicitatievraag bij Amazon

Coding question: convert a decimal number to its binary representation.