The hexadecimal (aka Base 16) number system uses sixteen symbols for counting and expressing value.
Hexadecimal Symbols and Values
In the hexadecimal number system, the symbols 0 to 9 represent values zero to nine and the symbols A to ?F (or lower case a to f) represent the values greater than 9 (ten to fifteen). Hexadecimal values are usually represented by the subscript '16', subscript 'hex', subscript 'h', the following letter 'H' or preceding '0x'.
Hexadecimal Symbols Table
Decimal Value | Hexadecimal Symbol | Possible Hexadecimal Value Representations |
---|---|---|
0 | 0 | 016 or 0hex or 0h or 0H or 0x0 |
1 | 1 | 116 or 1hex or 1h or 1H or 0x1 |
2 | 2 | 216 or 2hex or 2h or 2H or 0x2 |
3 | 3 | 316 or 3hex or 3h or 3H or 0x3 |
4 | 4 | 416 or 4hex or 4h or 4H or 0x4 |
5 | 5 | 516 or 5hex or 5h or 5H or 0x5 |
6 | 6 | 616 or 6hex or 6h or 6H or 0x6 |
7 | 7 | 716 or 7hex or 7h or 7H or 0x7 |
8 | 8 | 816 or 8hex or 8h or 8H or 0x8 |
9 | 9 | 916 or 9hex or 9h or 9H or 0x9 |
10 | A | A16 or Ahex or Ah or AH or 0xA |
11 | B | B16 or Bhex or Bh or BH or 0xB |
12 | C | C16 or Chex or Ch or CH or 0xC |
13 | D | D16 or Dhex or Dh or DH or 0xD |
14 | E | E16 or Ehex or Eh or EH or 0xE |
15 | F | F16 or Fhex or Fh or FH or 0xF |
Hexadecimal Digits
Similar to the base 10 system, the right most digit within a hexadecimal number is the least significant digit (LSD) and has the lowest place value. As further the digits move to the left, as higher the place value becomes. The right most digit within a hexadecimal number is the most significant digit (MSD) and has the highest place value.
Hexadecimal Place Values
6. Digit From Right | 5. Digit From Right | 4. Digit From Right | 3. Digit From Right | 2. Digit From Right | Right Most Digit | |
---|---|---|---|---|---|---|
Power of 16 (16x ): | 165 | 164 | 163 | 162 | 161 | 160 |
Place Value: | 104857610 | 6553610 | 409610 | 25610 | 1610 | 110 |
Place values are shown in decimal (base 10) number system as this is the number system we are most familiar with.
Hexadecimal Number Line
Example of a number line displaying hexadecimal numbers from -116
to 1B16
only:
The subscript '16' is not required as the number line is labelled 'Hexadecimal Number Line' and is omitted for clarity.
Hexadecimal Counting
Counting Bananas in Hexadecimal
In above image, let us count all the bananas in hexadecimal. We count as follows:
1 … 2 … 3 … 4 … 5 … 6 … 7 … 8 … That's it, there are 816
bananas in above image!
Counting Pears in Hexadecimal
Now let us count all the pears in hexadecimal. We count as follows:
1 … 2 … 3 … 4 … 5 … 6 … 7 … 8 … 9 … A … B … C … D … E … F … 10 … 11 … 12 … 13 … That's it, there are 1316
pears in above image! Remember not to say thirteen, as this would be the decimal pronunciation. Call the number digit by digit, e.g. one – three hexadecimal.
Counting Apples in Hexadecimal
We can also count all the apples in hexadecimal. We count as follows:
1 … 2 … 3 … 4 … 5 … 6 … 7 … 8 … 9 … A … B … C … D … E … F … 10 … 11 … 12 … 13 … 14 … 15 … 16 … 17 … 18 … 19 … 1A … 1B … 1C … 1D … 1E … 1F … 20 … 21 … 22 … 23 … 24 … 25 … That's it, there are 2516
apples in above image! Again remember not to say twenty-five, as this would be the decimal pronunciation. Call the number digit by digit, e.g. two – five hexadecimal.
Counting All Pieces of Fruit in Hexadecimal
Finally we count all the pieces of fruit in hexadecimal, count as follows:
1 … 2 … 3 … 4 … 5 … 6 … 7 … 8 … 9 … A … B … C … D … E … F … 10 … 11 … 12 … 13 … 14 … 15 … 16 … 17 … 18 … 19 … 1A … 1B … 1C … 1D … 1E … 1F … 20 … 21 … 22 … 23 … 24 … 25 … 26 … 27 … 28 … 29 … 2A … 2B … 2C … 2D … 2E … 2F … 30 … 31 … 32 … 33 … 34 … 35 … 36 … 37 … 38 … 39 … 3A … 3B … 3C … 3D … 3E … 3F … 40 … That's it, there are a total of 4016
pieces of fruit in above image! Don't say forty, just call it e.g. four – zero hexadecimal.
Hexadecimal Numbers in Computing
The primary use of the hexadecimal number system is a human-friendly representation of binary-coded values in computing and digital electronics where one hexadecimal digit represents four binary digits.