What is Hexadecimal Number
Hexadecimal number is a notation system for numbers.
In hexadecimal numbering system, we represent numbers using 16 symbols. Each digit is any 0 to 9 and A to F (sometimes lowercase).
Here's examples:
decimal | Binary | hexadecimal |
---|---|---|
0 | 0 | 0 |
1 | 1 | 1 |
2 | 10 | 2 |
3 | 11 | 3 |
4 | 100 | 4 |
5 | 101 | 5 |
6 | 110 | 6 |
7 | 111 | 7 |
8 | 1000 | 8 |
9 | 1001 | 9 |
10 | 1010 | a |
11 | 1011 | b |
12 | 1100 | c |
13 | 1101 | d |
14 | 1110 | e |
15 | 1111 | f |
16 | 10000 | 10 |
17 | 10001 | 11 |
18 | 10010 | 12 |
19 | 10011 | 13 |
20 | 10100 | 14 |
21 | 10101 | 15 |
22 | 10110 | 16 |
23 | 10111 | 17 |
24 | 11000 | 18 |
25 | 11001 | 19 |
26 | 11010 | 1a |
27 | 11011 | 1b |
28 | 11100 | 1c |
29 | 11101 | 1d |
30 | 11110 | 1e |
31 | 11111 | 1f |
Hexadecimal is used often in computing, because each hexadecimal digit is equivalent to 4 Binary digits, so is compact and more readable.
- 1 hexadecimal digit has the same number of possible values as 4 bits.
- 2 hexadecimal digit has the same number of possible values as 8 bits.
- 3 hexadecimal digit has the same number of possible values as 12 bits.
- 4 hexadecimal digit has the same number of possible values as 16 bits.
So, 4 bits can be written as 1 hexadecimal. 8 bits can be written as 2 hexadecimal, etc.
Possible Size in Hexadecimal Number
If a hexadecimal number has n digits, it has 16^n possible values.
number of digits | possible distinct values |
---|---|
1 | 16 |
2 | 256 |
3 | 4096 |
4 | 65536 |