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 2^{3}. 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.

2^{0} is 1

2^{1} is 2

2^{2} is 4

2^{3} is 8

2^{4} is 16

You take the biggest power of 2 in your number, for this it is 2^{3}, or 8.

Then, you put a 1 where the 2^{3} is represented. so your number should look like 1. Then you subtract 2^{3} from 10, which is your original number, and you will get 2. If you break up 2 into powers of 2, you will get 2^{1}. Now, since you didn't use 2^{2}, 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 2^{1}, and that is 2^{0}. Since you didn't use 2^{0}, 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.