I need to convert a binary number to a two-digit decimal number. For example:

```
01111 becomes 15
00011 becomes 03

```

I'm not simply trying to display the digits. I need to put each digit into an int variable. Say I have two int variables, leftnum and rightnum.

Then in the first example, leftnum = 1 and rightnum = 5.
In the second example, leftnum = 0 and rightnum = 3.

There are two restrictions which make this a little difficult. mod and / can only be used with powers of 2.