Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
If sum=12 in add_binary method, then place_holder in the while loop first takes the value of 3 and then it takes the value of 2. Hence number = 0 + 10^3 + 10^2 = 1100 and sum = 12 - 2^3 - 2^2 = 0 thus exiting the loop. Run over your logic again.
That's not right. Suppose the input is 12, the out put is 1011.2, the correct answer is 1100.