Denary
Denary, also known as "decimal" or "base 10," is the standard number system used around the world. It uses ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) to represent all numbers. Denary is often contrasted with binary, the standard number system used by computers and other electronic devices.
The first two letters in denary ("de") are an abbreviated version of "dec" which is a Latin prefix meaning "ten." The Latin prefix "bi" means two. Therefore, the denary system contains ten digits, while the binary system only contains two (0 and 1). Both systems can be used to represent any integer. The table below shows how numbers are displayed in both denary and binary.
Denary | Binary |
---|---|
1 | 1 |
5 | 101 |
10 | 1010 |
50 | 110010 |
100 | 1100100 |
1,234 | 10011010010 |
To calculate the value of a number in either denary or binary, you can multiply each digit by the appropriate multiplier and add them together to get the total. In denary, each digit from right to left is multiplied by 10 to the corresponding power, starting with 0. For example, 1,234 in denary can be calculated as follows:
4 x 1 (100) + 3 x 10 (101) + 2 x 100 (102) + 1 x 1,000 (103) = 4 + 30 + 200 + 1,000 = 1,234.
In binary, each digit is multiplied by 2 to the corresponding power. For instance, the binary number 1010 can be calculated in denary as:
0 x 1 (20) + 1 x 2 (21) + 0 x 4 (22) + 1 x 8 (23) = 0 + 2 + 0 + 8 = 10.
Another less common number system is hexadecimal, which uses the same ten digits as denary plus A, B, C, D, E, and F. Understanding hexadecimal numbers is important for web developers and computer science majors, but is not necessary for the average user. Simply knowledge of the denary number system is sufficient for most people.