Dye & Durham interview question

Write a function to convert a decimal number to binary.