In reply to yourcheers:
Since this seems to be an interview question that you both have failed, let me ask a few questions as hints.
- How many binary bits do you need to store a 10-digit decimal number
- How do you convert a binary number to decimal digits?