CSC110 - Computer Mathematics

Module 1 Section 1 - Review of the Decimal Number System

Learning about the binary number system will be easier if you first think about something with which you are already familiar: the decimal number system.

Decimal means base 10 (note the prefix dec). For any number system, if you know that number system's base (also called the radix), then you know how many digits can be used in creating written numbers in that system. Base 10 (decimal) has 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

For any number system that has a base b, the first b non-negative numbers are represented by the digits themselves. For base b=10 (decimal), the first 10 numbers are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.

After the first b numbers, you run out of digits.  What do you do? Numbers beyond the first b numbers are represented by writing multiple digits, and associating each digit with place value. As you know, the number that follows 9 is 10, and writing 10 uses two digits: '1' and '0'. The '1' occupies the "tens" place and the '0' occupies the "ones" place. That's 1 "ten" and 0 "ones". Counting continues with 11, 12, 13, ..., 18, 19, and finally 20, which is 2 "tens" and 0 "ones."

Eventually, the number 99 is reached (9 tens and 9 ones). The next number in the sequence will require adding a third place, the "hundreds" place, to the left, for the number 100: 1 "hundreds," 0 "tens", and 0 "ones."

Each place in a decimal number is associated with a power of ten, as we have seen. The right-most position is associated with "ones" or 100. The position to the left is associated with "tens" or 101. The position to the left of that is associated with "hundreds" or 102.

You'll notice that the powers of ten start with the 0th power and count upward as you move to the left, as shown in this diagram.

[IMAGE]

Any number can be written as a sum of products of powers of 10. This sounds complicated, but it really isn't. A "sum" is things added together. The things we will add together are "products" which are simply multiplications. What we will multiply is a single digit times 10 raised to a power. This is easiest understood by using an example.

Consider the number '327.' Suppose we wrote it down in the diagram shown above.  It would look like this:

We can write the number '327' as a sum of products of powers of ten as follows. For each digit place, take the digit and multiply it by 10 to the power associated with that digit's place, then add all of them together.

Let's concentrate first on writing the product of a digit and a power of ten. Later, we'll worry about adding them together. We'll work with the '3' of '327' first. Using our diagram as a guide, the product can be built by taking the '3' and multiplying it by 10 raised to the 2nd power.

If we do this for the other digits, we get 2 x 101 and 7 x 100. You can see that we get one product for each digit. Now we form the sum by simply adding them all together, like this:

(3 x 102) + (2 x 101) + (7 x 100)

And there we have our sum of products of powers of ten. This is the number '327' written in an expanded notation. It means exactly the same thing as writing '327' - it's just longer. This kind of notation is much more specific than just writing '327' because the base is given. When you see the number '327' written, you assume the base is 10. With computers, you can't always assume the base is 10.  In fact, many times the base will be 2, 8, or even 16! The expanded notation is one way to be sure we know exactly what number it is that we are considering.

This is fine, as long as you don't have any numbers with digits to the right of a decimal point. So how do you handle those? First, let's expand our diagram of place values to include a decimal point and places to the right of it. Here is how it would look:

As you can see, the place values become negative powers of ten, counting backwards from zero. This is logical, and easy to remember. The rule about writing any number in expanded notation still works, too, without any modification. For example, the number '43.57' would be written as:

4 x 101 + 3x 100 + 5 x 10-1 + 7 x 10-2

Notice that we didn't use parentheses in this one (as we did in our first example) because they are not necessary. Multiplication has a higher precedence than addition. Everyone agrees that, when no parentheses are given and you have a choice between addition and multiplication, you should do mulitplication first.

Homework Questions

    Write the following decimal numbers in expanded notation:

  1. 354
  2. 27.08
  3. 0.003
  4. 0.0
  5. 1007
  6. 83729
  7. 281
  8. 30.0201
  9. 1
  10. 1210

    Write the following expanded form numbers as decimal numbers:

  11. (3x102) + (0x101) + (4x100)
  12. (5x10-2) + (0x10-3) + (3x10-4) + (0x10-5) + (8x10-6)
  13. (4x1010) + (8x109) + (0x108) + (4x107) + (3x106) + (0x105) + (0x104) + (0x103) + (0x102) + (0x101) + (0x100) + (1x10-1)
  14. (4x1010) + (8x109) + (4x107) + (3x106) + (1x10-1)
  15. (3x102) + (8x10-3)
  16. (0x1023) + (0x1022)
  17. (4x103) + (6x104) + (3x102) + (2x105)
  18. (8x108) + (7x107) + (6x106)
  19. (0x100)
  20. (0x10-1)
Next Section: Introducing the Binary Number System
Return to Module Index