Decimal
Let’s learn about the decimal number system.
We'll cover the following
Everyone is familiar with decimal numbers. We use decimal numbers in our calculations everyday. Representing numbers in decimals is just one possible way of writing a number. There are many other writing methods, such as Roman numbers and Chinese characters. This section introduces two other ways of writing numbers: binary and hex. Binary and hex are particularly useful in digital communication. In fact, at the most fundamental level, binary numbers are the basis of all computing. In this section, we’ll make extensive use of the notation for decimal exponentiation. For example, if we write (10 to the power 7), then we mean 10 multiplied by itself seven times:
Note: It is a standard mathematical convention to say that any number raised to the power 0 is 1. For example, = 1.
Decimal
Let’s understand some of the principles behind decimal numbers.
Writing a number as a decimal
Consider the number 359. What do 3, 5, and 9 actually represent? Observe that:
All we have done in these last three lines is rewrite the number 359 in a form that shows how it can be represented as a sum of multiples of powers of ten. This is why our most familiar numbers are often referred to as decimal numbers: the digits we use to write them to indicate the multiples of powers of ten that are added together to make up the number. Observe two things:
-
The digits of a decimal number can take any of the values from 0 up to 9.
-
Every digit in a decimal number will be multiplied by some power of 10. The powers of 10 start with 0 (the furthest digit to the right) and then increase from right to left.
Decimal numbers are sometimes also referred to as base 10 numbers. This is because the representation of the number in digits is ‘based’ on the powers of 10, as we have just seen. We normally don’t bother indicating that a number is written in base 10, since this tends to be assumed by default. However, because we will be changing numbers from one base into another, we will often need to indicate the base being used. To indicate that the number 359 is a decimal number, we will sometimes write it as .
Leading zeros
As a last remark about decimal (or any number base), any number of zeros can be put in front of a decimal number without changing its value. These are called leading zeros. For example:
This is consistent with our previous way of expressing decimal numbers, since:
Of course, when writing numbers in decimal, we do not normally use any leading zeros.
Get hands-on with 1200+ tech skills courses.