Positional Notation - Mathematics - Base Conversion

Base Conversion

Bases can be converted between each other by drawing the diagram above and rearranging the objects to conform to the new base, for example:

241 in base 5: 2 groups of 5² 4 groups of 5 1 group of 1 ooooo ooooo ooooo ooooo ooooo ooooo ooooo ooooo + + o ooooo ooooo ooooo ooooo ooooo ooooo is equal to 107 in base 8: 1 group of 8² 0 groups of 8 7 groups of 1 oooooooo oooooooo o o oooooooo oooooooo + + o o o oooooooo oooooooo o o oooooooo oooooooo

There is, however, a shorter method which is basically the above method calculated mathematically. Because we work in base ten normally, it is easier to think of numbers in this way and therefore easier to convert them to base ten first, though it is possible (but difficult) to convert straight between non-decimal bases without using this intermediate step. (However, conversion from bases like 8, 16 or 256 to base 2 can be achieved by writing each digit in binary notation, and subsequently, conversion from base 2 to e.g. base 16 can be achieved by writing each group of four binary digits as one hexagesimal digit.)

A number anan-1...a2a1a0 where a0, a1... an are all digits in a base b (note that here, the subscript does not refer to the base number; it refers to different objects), the number can be represented in any other base, including decimal, by:

Thus, in the example above:

To convert from decimal to another base one must simply start dividing by the value of the other base, then dividing the result of the first division and overlooking the remainder, and so on until the base is larger than the result (so the result of the division would be a zero). Then the number in the desired base is the remainders being the most significant value the one corresponding to the last division and the least significant value is the remainder of the first division.

Example #1 decimal to septal:

begin{align}123_{10} = 123 / 7 = 17text{ with a remainder of }(4)\
17 / 7 = 2text{ with a remainder of }(3)\
2 / 7 = 0text{ with a remainder of }(2)\
&= 234_7end{align}

Example #2 decimal to octal:

begin{align}456_{10} = 456 / 8 = 57text{ with a remainder of }(0)\
57 / 8 = 7text{ with a remainder of }(1)\
7 / 8 = 0text{ with a remainder of }(7)\
&= 710_8end{align}

The most common example is that of changing from decimal to binary.

Read more about this topic:  Positional Notation, Mathematics

Famous quotes containing the words conversion and/or base:

    The conversion of a savage to Christianity is the conversion of Christianity to savagery.
    George Bernard Shaw (1856–1950)

    Study is like the heaven’s glorious sun,
    That will not be deep searched with saucy looks;
    Small have continual plodders ever won,
    Save base authority from others’ books.
    William Shakespeare (1564–1616)