Skip to content

Base R to Base 10 Conversion

This is the easier part of the conversion. We simply use the definition of weighted-positional number system and change the base.

Power of 2

Since a computer uses binary system (on/off; high/low voltage; etc), it is always useful to memorise some of the power of 2s.

Positive Value Negative Value
21 2 2-1 0.5
22 4 2-2 0.25
23 8 2-3 0.125
24 16 2-4 0.0625
25 32 2-5 0.03125
26 64 2-6 0.015625
27 128 2-7 0.0078125
28 256 2-8 0.00390625
29 512 2-9 0.001953125
210 1024 2-10 0.0009765625

Weighted-Positional Number Systems

You can choose the examples below for more explanation before attempting a quick quiz below.

Conversion via Weighted Positional Number System

(1101.101)2

= 1 × 23 + 1 × 22 + 0 × 21 + 1 × 20 + 1 × 2-1 + 0 × 2-2 + 1 × 2-3

= 8 + 4 + 0 + 1 + 0.5 + 0 + 0.125

= 13.625

(572.6)8

= 5 × 82 + 7 × 81 + 2 × 80 + 6 × 8-1

= 320 + 56 + 2 + 0.75

= 378.75

(2A.8)16

= 2 × 161 + 10 × 160 + 8 × 16-1

= 32 + 10 + 0.5

= 42.5

Shortcut

As a shortcut, we can simply ignore the bit 0 since -by definition- 0 × 2n = 0 for any n. In such cases, we simply write the second step above as

= 1 × 23 + 1 × 22 + 1 × 20 + 1 × 2-1 + 1 × 2-3

Quick Quiz
  1. Convert the binary number (1101001.0110)2 to decimal.
  2. Convert the octal number (6204.12)8 to decimal.
  3. Convert the hexadecimal number (CA.FE)16 to decimal.
  1. 105.375

    Steps

    (1101001.0110)2

    = 1 × 26 + 1 × 25 + 1 × 23 + 1 × 20 + 1 × 2-2 + 1 × 2-3

    = 64 + 32 + 8 + 1 + 0.25 + 0.125

    = 105.375

  2. 3204.15625

    Steps

    (6224.12)8

    = 6 × 83 + 2 × 82 + 4 × 80 + 1 × 8-1 + 2 × 8-2

    = 3072 + 128 + 4 + 0.125 + 0.03125

    = 3204.15625

  3. 202.9921875

    Steps

    (CA.FE)16

    = 12 × 161 + 10 × 160 + 15 × 16-1 + 14 × 16-2

    = 192 + 10 + 0.9375 + 0.0546875

    = 202.9921875

Exercises

Exercises

You are given a number 2100 but you do not know the base.

  1. What is the smallest base that the number can take?
  2. What is the largest base such that the number does not exceed 1000?
  3. What is the smallest base such that the number is at least 3000?
  1. The smallest is 3 because we have the digit 2. This means the base cannot be 2.
  2. The largest is 7 because (2100)7 = 735 and (2100)8 = 1088.
  3. The smallest is 12 because (2100)11 = 2783 and (2100)12 = 3600.