Hexidecimal. Other applications, and HTML, use a different number system to represent the numeric values of intensities. This number system is called hexidecimal, meaning base 16. Hexidecimal is used for a variety of reasons, one of which is that the 256 different levels of intensity can be represented using a two digit hexidecimal "number". We're using hexidecimal, or base sixteen, we need more than our familiar range of digits, since each digit in base sixteen needs to represent one of 16 different values. The digits 0,1,2,3,4,5,6,7,8, and 9 give us ten of the values we need, and we use the letters A,B,C,D,E, and F give us the other six. Let's compare the three major number systems used in computers:
Number System |
Binary |
Decimal |
Hexidecimal |
Base |
2 |
10 |
16 |
Possible values for each digit |
0 or 1 |
0,1,2,3,4,5,6,7,8,9 |
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F |
Using this, we can take a look at the binary, decimal, and hexidecimal representations of the numbers zero through fifteen.
Binary |
0000 |
0001 |
0010 |
0011 |
0100 |
0101 |
0110 |
0111 |
1000 |
1001 |
1010 |
1011 |
1100 |
1101 |
1110 |
1111 |
Decimal |
00 |
01 |
02 |
03 |
04 |
05 |
06 |
07 |
08 |
09 |
10 |
11 |
12 |
13 |
14 |
15 |
Hexidecimal |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
A |
B |
C |
D |
E |
F |