Lots of math... ignore this

Jun 26, 2005 21:32

Don't mind this entry. It's just my documentation of how I figured out Base conversions. If you feel like reading it tho, I've left explanations.

Our number system is in Base 10, meaning we go from 0 to 9, then it repeats the process -- an 'arithmetic sequence' for those who know lots of useless terminology. That means it goes 0-9, then 10-19, then 20-29 and so forth. The new digit added (the 10's, 20's...) is a marker for how many whole sets of 10 numbers (0-9, where 0 acts as a number but is actually emptiness) we have passed in our sequence. In other words, 17 means we have passed 1 whole set of 10 numbers, and then we have passed another 7 (remember, 0 is almost a number, but rather a way of saying "emptiness")
{Visual Example}
{0 1 2 3 4 5 6 7 8 9} 10 11 12 13 ...
  set of 10 numbers   passed 10 numbers, start a new sequence

Now, with this in mind, I started working with Base 2, also known as binary numbers -- 0 and 1 are the only numbers in the sequence. Here is a list of binary numbers

0 - 0
1 - 1
2 - 10 (one set of two numbers and an addional increment, or 0 + 1 + one additional number -- two)
3 - 11 (one set of two numbers + 2 increments, 0+1+2, or 3)
4 - 100 (this gets confusing; I'll explain in a bit)
5 - 101
6 - 110
7 - 111
8 -1000

So do you see how after 1, it moved to 10? The reason is because there is no such thing as #2 in binary numbers. The way it is represented is adding another place value. 10 is saying there is 1 set of numbers (one 0, and one 1) PLUS an additional increment. I know, binary is probably a hard concept to lecture, so I'll stop here. It's just showing how Base10 and Base2 are related.

So, about those conversions! I'll go back Base10 (the numbers you're used to using in math class).

Say we are given the number 5432. That's like saying 5000+400+30+2, right? Now break that down even further! (5*1000) + (4*100) + (3*10) + (2*1). Guess what? You can STILL break that down even further. Ready?
(5 * 103) + (4 * 102) + (3 * 101) + (2 * 100)
What's all this breaking down supposed to mean? I'll show ya. Notice how the number with all the exponents is a 10? Yeah... that's also the base number we're in. Hmm... let's try it with binary! (I can see the excitement on your face)

We're given the binary number 11011. Well, using the figure from above
[digit2] * 2location 2 + [digit1] * 2location 1

we can translate this to Base 10. Ready for this?
(1 * 24) + (1 * 23) + (0 * 22) + (1 * 21) + (1 * 20)

That gives use 16 + 8 + 0 + 2 + 1, or 27. So 110112 = 2710 (x10 means a number in Base10; x2 is Base2)

Isn't that pretty cool? (maybe for nerdy guys like me, eh?)
Previous post Next post
Up