Please insert the number that you would like to convert.
You're in math class. Your teacher says, "Alright kids! When you're done with your worksheet, you can come up and get this one for extra credit!" You go up, of course. You've finished your worksheet very quickly. You look down at the extra credit sheet.
"Find which base...", "What base is this...", "Convert this number to binary..."
It all seems very scary. I mean computers use binary, right? It must be very complicated.
All you have to know to convert numbers to binary is the powers of two. You know, 2, 4, 8, 16, 32...
Basically, an exponent(or a power) is when there is a little number above another number. Like 23. What this means is that you take the big number, in this case it's 2, and multiply it by itself however many times the little number is, in this case it's 3.
So you would do 2 times 2, which is four, times two, which is eight. So 2x2x2. See that there are three 2s? Well that's because the little number is 3.
Also, anything to the power of 0 is 1.
So for binary, you break the number up into powers of 2. Every 1 is a power of two, and every 0 means that there is no power of two.
You take the biggest power of 2 in your number, and you put a one representing that. Then, take your original number, and subtract the biggest power of 2 from it. From what you have left, you find the next biggest power of two, and put a one representing that. For every power of 2 that you don't use in between the biggest one and the one that you just put a one for, you are going to put a zero.
Lets do 10.
20 is 1
21 is 2
22 is 4
23 is 8
24 is 16
You take the biggest power of 2 in your number, for this it is 23, or 8.
Then, you put a 1 where the 23 is represented. so your number should look like 1. Then you subtract 23 from 10, which is your original number, and you will get 2. If you break up 2 into powers of 2, you will get 21. Now, since you didn't use 22, you will put a zero there, and your number should look like 101. There is one more step, since there is one more power of 2 that is less than 21, and that is 20. Since you didn't use 20, all you have to do is add a zero. Your number should look like 1010.
Basically what this program did was it took the number you put in, and broke it up into powers of 2, and represented those with 1s and 0s.