Amazon Interview Question

Write code for binary numbers