1.1 : Base-10


Base-10 is the number system we all know and love. We've been doing math with base-10 our entire lives. Since we know how to add, subtract, multiply, divide and can do algebra with this number system, I'd say we know it very well. Our new goal is to understand all number systems as well as we understand base-10. Let's dissect base-10 and learn the intricacies and translate that to other number bases.

Consider the number 314. This is a basic 3 digit number that will be rather easy to dissect. To break down this number, I've set up the following table:

Digit 3 1 4
Power 102 101 100
Value (3 * 102) (1 * 101) (4 * 100)
300 10 4

We've got three columns, one for each place value. We've got three rows,

So the number 314 dissected is equal to 300 + 10 + 4. This is equal to (3 x 102) + (1 x 101) + (4 x 100). This form will allow us to understand every number system.


Generalizing

Given a base B and an n digit number w=wn-1 ... w0 where wi ∈ [0,B-1] ∀ i ∈ [0, n), The base-10 value of the number can be computed with:

Converting a base B number to base 10
Given an n digit number w in base B where
w=wn-1...w0 and wi ∈ [0,B-1] ∀ i ∈ [0, n),
The base-10 value of the number can be computed with:
 n-1  ⎛      i⎞
  ∑   ⎜ w * B ⎟
 i=0  ⎝  i    ⎠

I bet I know what you're thinking. "Whoa Charlie, I was totally understanding that addition and multiplication, but then you added all this strange complicated math I've never seen before and now I don't know anything". If so, let's agree to disagree.

This section is going to be overwhelming. I used new math notation you've probably never seen before. As I walk through it, you'll realize that the actual math is very simple, it's just a new way of writing it out. Let's go over every symbol and what it all means.

"Given" refers to our inputs and information we have to start the problem. Let's go over the givens:

Let's break down the math language in w separately:

There we have it, we've covered the fancy math language that describes our input. It looks really complicated, but that's just because you've never seen it before. The given statement is really just saying "If we have a number in a base B, then that number has to abide by the rules of the number base".

Now let's look at that summation.

Let's plug in the values from the 314 example and see it in action.

 n-1  ⎛      i⎞
  ∑   ⎜ w * B ⎟
 i=0  ⎝  i    ⎠
 3-1  ⎛       i⎞
  ∑   ⎜ w * 10 ⎟
 i=0  ⎝  i     ⎠
  2   ⎛       i⎞
  ∑   ⎜ w * 10 ⎟
 i=0  ⎝  i     ⎠
⎛       0⎞   ⎛       1⎞   ⎛       2⎞
⎜ w * 10 ⎟ + ⎜ w * 10 ⎟ + ⎜ w * 10 ⎟
⎝  0     ⎠   ⎝  1     ⎠   ⎝  2     ⎠
( 4 * 1 ) + ( 1 * 10 ) + ( 3 * 100 )
4 + 10 + 300
314

See, it's all math you already know, just in a new format. Again, this is probably super overwhelming, but take the time to digest the actual math and the way we convert to base-10.


Back To Top