img.latex_eq { padding: 0; margin: 0; border: 0; }

Saturday, 3 February 2007

Bases of Number Systems

Take a number. Take 462, for example. That's 4 x 10^2 + 6 x 10^1 + 2 x 10^0. Yes?

Or take 43.5. That's 4 x 10^1 + 3 x 10^0 + 5 x 10^(-1).

If your knowledge of raising things to a power is a little rusty and you think that having something to the power of zero or negative one looks strange, think about it this way. Ten cubed is 1000, right? Divide by ten and you get ten squared. Divide that by ten and you get ten to the power of one. Divide that by ten and you get... ten to the power of zero (which equals one). Divide by ten again to see that 1/10 = 10^(-1).

The point is, this is the way we choose to write our numbers: the first digit to the left of the decimal point takes its value multiplied by one, the next one along to the left adds its value multiplied by 10, the next digit adds its value numtiplied by ten squared, and so on. If we proceed to the right of the decimal point the digits start adding their values multiplied by 1/10, 1/100 and so on. A number system which uses powers of ten in this way is said to be in base 10.

Why do we use ten? Theoretically, it doesn't have to be ten. It can be two. This is called base 2, or binary. There are only two possible digits, zero and one. If you want to write the number two, you have to remember that the digit which is second to the left of the decimal point now takes its value multiplied by two. So we write:

10 = 1 x (two)^(one) + 0 x (two)^(zero) = two

I have chosen not to write two as '2' in the above because this symbol is part of the base 10 system, and it could cause confusion in the above if the left of the equation is written in base 2 and the right of the equation is written in base 10.

What if you want to write three?

11 = 1 x (two)^(one) + 1 x (two)^(zero) = three

Four?

100 = 1 x (two)^(two) + 0 x (two)^(one) + 0 x (two)^(zero) = four

And so on.

You can use any natural number greater than one as a base. If you want to use the number thirteen, the fact that it is greater than ten will mean you will need to come up with new digits to represent 10, 11 and 12.

Writing a number in a different base doesn't change any of its arithmetic properties (unless those properties involve something like adding up the digits, of course!) Two plus two is four whether you write that as 2 + 2 = 4 or 10 + 10 = 100. Two times three equals six whether you write that as 2 x 3 = 6 or 10 x 11 = 110 (work out that last one: 1 x (two)^(two) + 1 x (two)^ (one) ).

It's just a question of how you choose to write it.

No comments: