So I have a bunch of code I want to reuse, because I saved them up in my hard drive and I don't want to waste time re-implementing them. So I was wondering if I am on the right track. I got the gist of it, but I am trying to make sure I don't run into some problem later on.
In all of my algorithms, I use the variable addToNextSlot and addToSlot. addToNextSlot put a number in the vector after dividing by 10 and addToSlot get the value from %10. So if I understand correctly to do base 2, we just need to change %10 and /10 to %2 and /2, right? How about when I get the value 2 after I add up these 3 rows I get after multiplying a number x with a number y. I would get the value 3 in addToNextSlot, so it's me or I can't reuse my code at all and I have to think this through instead of just changing stuff here and there?
11111111
11111110
11111110