Understanding Hexadecimal & Decimal Number Systems
Hexadecimal Number System
The hexadecimal number system, or base 16, is the numbering system commonly used in computing, web design, and digital electronics. It uses sixteen symbols: the digits 0 to 9 and the letters A to F, which stand for the values 10 to 15. Because 16 is a power of 2, hexadecimal maps directly to binary while remaining much shorter and easier to read.
The hexadecimal number "3A7" can be understood as follows:
- The first digit (the rightmost or LSB digit) (7) is in the one's place, (7 * 1 = 7)
- The second digit (A) , which represents 10, is in the sixteen's place, (10 * 16 = 160)
- The third digit (the leftmost or MSB digit) (3) is in the two hundred fifty-six's place, (3 * 256 = 768)
Therefore, the hexadecimal number (3A7)16 is equivalent to the decimal value of (7 + 160 + 768) = (935)10.
Now let's look at a hexadecimal number that has a fractional part. For instance, 1C.5. The hexadecimal number "1C.5" has two parts: the integer part (e.g. 1C) and the fractional part (e.g. .5).
The integer part (1C) of the hexadecimal number can be understood as follows:
- The first digit (the rightmost digit) (C) , which represents 12, is in the one's place (12 * 1 = 12)
- The second digit (the leftmost digit) (1) is in the sixteen's place (1 * 16 = 16)
So the integer hexadecimal part 1C is equivalent to the decimal number 12 + 16 = 28.
And the fractional part (.5) of the hexadecimal number can be understood as follows:
- The first digit after the decimal (5) is in the 16-1 or 1/16th place (5 * 16-1 = 5 * 0.0625 = 0.3125)
So the fractional hexadecimal part .5 is equivalent to the decimal number 0.3125.
Therefore, the hexadecimal number (1C.5)16 is equivalent to the decimal value of (28.3125)10.
In summary, when converting a hexadecimal number to its decimal equivalent, we multiply each hexadecimal digit by its place value and add the products. Place values are positive for the integer part and negative for the fractional part.
Decimal Number System
The decimal number system, often referred to as base 10, is the number system familiar to most of us because we use it every day for arithmetic, money, and measurement. It is built upon ten possible values: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
Each place value represents a power of ten. For example, the decimal number "8216" can be understood as follows:
- The first digit (the rightmost or LSB digit) (6) is in the one's place, (6 * 1 = 6)
- The second digit (1) is in the ten's place, (1 * 10 = 10)
- The third digit (2) is in the hundred's place, (2 * 100 = 200)
- And the fourth digit (the leftmost or MSB digit) (8) is in the thousand's place, (8 * 1000 = 8000)
Therefore, 6 + 10 + 200 + 8000 = 8216.
The decimal system works exactly the same way as hexadecimal, except each position is a power of 10 instead of a power of 16. Because the decimal system is the default for everyday use, the base is usually omitted, so if a number has no base written next to it, you can assume it is decimal.