Appinventiv interview question

write a code to convert a digit into binary equivalent