CS 101 -- number systems

Here is a great pointer to a web page on binary arithmetic and binary numbers.

The notation we use for writing numbers is positional. Each position corresponds to a value. The value associated with a position is the base raised to a power. The value of the right-most position of a number is the base raised to the power zero: any number raised to the power zero is one, so we say that this is the ones place. The value of the position to the left of that is the base raised to the power one: in base 10, this value is 10, and in base 2, this value is 2. In fact, in any base at all the value of the position next to the ones is the base. The position values continuing to the left are simply increasing powers of the base.

When you raise a number to a power, the number is called the base and the power is called the exponent. This is a shorthand notation that means multiply the value of the power the number of times specified in the exponent. For example:
10 raised to the power 2 (10 "squared") means 10 X 10
4 raised to the power 5 means 4 X 4 X 4 X 4 X 4

In base 10 for the first 6 position values we have:

    5        4       3     2    1   0 (power)
  10       10      10    10   10  10  (base)

100,000  10,000  1,000   100  10   1  (value)
where the value is the base raised to the power associated with that position.

The value of a number represented by a string of digits in positions is calculated by multiplying the digit in each position by the value of that position, and summing up all of these values. The number 368,125 in base 10 (decimal) has the following value:

   3 X 100,000 +
   6 X  10,000 +
   8 X   1,000 +
   1 X     100 +
   2 X      10 +
   5 X       1 
When we talk about representing numbers in different bases, we just change the base. For example, the first 6 position values in base 2 are:
    5  4  3  2  1  0 (power)
   2  2  2  2  2  2  (base)

   32 16 8  4  2  1  (value)

And the value of the number 101101 in base two (binary) is:
  1 X 32 +
  0 X 16 +
  1 X  8 +
  1 X  4 +
  0 X  2 +
  1 X  1
which is (in base 10) 32+8+4+1=45.