Amazon Interview Question

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