Amazon interview question

Write code for binary numbers