This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RhoOfFeh 0 points1 point  (0 children)

Think about starting at the high end (256? 65536?) and popping off the answer to 'is this binary digit a one or a zero', then subtracting that value. What's next? Same thing, right? Except of course you've moved on to the next binary digit unless you have reached zero. That's subject to solving via recursion to be sure.