Hexadecimals
A hexadecimal number is based on the number 16
16 Different Values
There are 16 hexadecimal digits. They are the same as the decimal digits up to 9, but then there are the letters A, B, C, D, E and F in place of the decimal numbers 10 to 15:
| Hexadecimal: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Decimal: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
So a single hexadecimal digit can show 16 different values instead of the normal 10.
Counting
Choose "Hexadecimal" below and watch it count:
After the ones place reaches F it resets to 0, and we add 1 to the next position (to show a group of 16)
And after that position reaches F, we do the same thing, and so on.
As we move left, every place is 16 times bigger.
Example: The decimal value of the hexadecimal number "D1CE"
(Test it in the Binary to Decimal to Hexadecimal Converter.)
10
When we see 10 in Hexadecimal, it doesn't mean the decimal ten. It means one group of sixteen and zero ones.
It is good practice to put a little "16" as a subscript, so we know it is a hexadecimal number:
- ...
- E16 = 1410 (E in hex is 14 in decimal)
- F16 = 1510
- 1016 = 1610
- 1116 = 1710
- ...
The Point!
Example: 2E6.A3
This is 2×16×16 + 14×16 + 6 + 1016 + 316×16
= 742.63671875 in Decimal
Read below to discover why
Numbers can be placed left or right of the point, to show values greater than one or less than one:
The digit just left of the point is a whole number. Moving left every digit place is 16 times bigger. |
||
| • |
The first digit on the right of the point means sixteenths (1/16). Moving right every digit place is 16 times smaller (one sixteenth as big). |
More Examples
Example 1: What is 4B5 (hexadecimal)?
- The "4" is in the "16×16" position, so that means 4 ×16×16
- The "B" (11) is in the "16" position, so that means 11 ×16
- The "5" is in the "1" position so that means 5
- Answer: 4B516 = 4×16×16 + 11×16 + 5 (=1205) in Decimal
Example 2: What is 2.3 (hexadecimal)?
- On the left side is "2", that is the whole number part
- The 3 is in the "sixteenths" position, meaning "3 sixteenths", or 3/16
- So, 2.316 is "2 and 3 sixteenths" (=2.1875 in Decimal)
Hexadecimal Place Value Chart (Including Fractions)
In hexadecimal (base 16), each place represents a power of 16:
| 163 | 162 | 161 | 160 | 16-1 | 16-2 | 16-3 | |
|---|---|---|---|---|---|---|---|
| Hex: | 100016 | 10016 | 1016 | 116 | 0.116 | 0.0116 | 0.00116 |
| Decimal: | 4096 | 256 | 16 | 1 |
116 |
1256 |
14096 |
Example: Hexadecimal 2F.8A316:
| Place | 161 | 160 | 16-1 | 16-2 | 16-3 |
|---|---|---|---|---|---|
| Hex Digit | 2 | F | 8 | A | 3 |
| Decimal Value | 32 | 15 |
816 |
10256 |
34096 |
Total ≈ 47.53979492187510
Dogs
Dogs would find hexadecimal easy to understand: just count on their toes!