while mynum is not zero multiply binary by ten, add on the least significant digit of the number to be converter, and reduce the number to be converted by half.

Notice that this is going to give you a deceptive number - the machine will think of this as being a decimal number, so that's not great. You might want to think about assembling this as a String, not as a number.

But that's not your real problem here, of course. Remember that you're peeling number off the least-significant side, and reducing from the least-significant side. That means that after each round, the numbers you're dealing with are more significant - not less.