LESSON 02 – CONVERTING TO BASE 10

 

 

LESSON NOTE

CONVERTING FROM ANY BASE TO DECIMAL

 

OPTION 1 – SCIENTIFIC NOTATION

 

Do you remember how to write a number in scientific notation?

 

Let’s take the number 4327 and express it using scientific notation.

 

4327 = (4 x 1000) + (3 x 100) + (2 x 10) + (7 x 1)

 

which is the same as

 

4327 = (4 x 103) + (3 x 102) + (2 x 101) + (7 x 100)

 

Let’s consider the value of each number. The 7 represents the1s.  The 2 represents the 10s. The 3 represents the 100s. The 4 represents the 1000s.

 

It turns out this this will be useful to convert a number from any base to base 10.

 

USING SCIENTIFIC NOTATION WITH OTHER BASES

 

Let’s consider the number 4253 in base 7.  We can convert this number by expressing it in its scientific notation.

 

Before we can do that, we need to understand the value of each digit for any number in any base.  The rightmost digits always represents the units (the value 1).  The next digit on the left represents a value that is equal to the base we are working in.  The next is the base squared.  The one after is the base cubed.  And so on…

 

So, for base 7, the values of the digits are all powers of 7.  

  • The rightmost digit represents the 1s.
  • The next digit on the left represents the 7s.
  • The next digit on the left represents the 49s.
  • The next digits on the left represents the 343s.

 

But for base 4, the values of the digits are all powers of 4.

  • The rightmost digit represents the 1s.
  • The next digit on the left represents the 4s.
  • The next digit on the left represents the 16s.
  • The next digits on the left represents the 64s.

 

Now back to our number 42537.

 

We can express it in scientific notation:

 

42537 = (4 x 343) + (2 x 49) + (5 x 7) + (3 x 1)

 

Which can also be written as:

 

42537 = (4 x 73) + (2 x 72) + (5 x 71) + (3 x 70)

 

Example 1

 

Convert the binary (base 2) number to decimal:

 

            01101001

 

Solution

 

            01101001        = (1 x 26) + (1 x 25) + (1 x 23) + (1 x 20)

                                    = 64 + 32 + 8 + 1

 

Example 2

 

Convert the octal (base 8) number to decimal:

 

            726

 

Solution

 

            726                  = (7 x 82) + (2 x 81) + (6 x 80)

                                    = (7 x 64) + (2 x 8) + (6 x 1)

                                    = 448 + 16 + 6

                                    = 470

 

The approach used in the example above can be summarized in this way.

 

  • First you need to know the base of the number that you wish to convert to decimal.  For binary, the base is 2.
  • You multiply the rightmost number by base exponent zero.
  • Add the multiplication of the next number (on the left) and base exponent one.
  • Add the multiplication of the next number (on the left) and base exponent two.
  • Add the multiplication of the next number (on the left) and base exponent three.
  • Keep on going until there is no next number.