Microsoft interview question

How to convert an integer into a binary number?