Hexadecimal Numbers
Computers do not understand every-day (decimal=base10) numbers, but work with binary numbers (numbers that only use the digits 0 and 1=base2).This can make for some very long-winded numbers. See the examples in the table below. In the early days of computers, engineers started to group binary digits in threes to read them (octal numbers=base8). When personal computers came along in the late seventies, the number of binary digits (bits) in a standard unit of memory (Byte) was eight. In octal numbers this became a two-bit digit followed by two three-bit digits.
It seemed more logical to split these eight-bit digits into two four-bit digits. Thus a Byte becomes two four-bit (hexadecimal=base16) numbers. Having only ten digits in decimal numbers, the shortfall is made up by adopting the letters 'a' to 'f' for the missing digits.
Whatever the base, arithmetic is the same. Try some for yourself.
Numbers in different systems | |||
---|---|---|---|
Decimal | Binary | Octal | Hexadecimal |
0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 |
2 | 10 | 2 | 2 |
3 | 11 | 3 | 3 |
4 | 100 | 4 | 4 |
5 | 101 | 5 | 5 |
6 | 110 | 6 | 6 |
7 | 111 | 7 | 7 |
8 | 1000 | 10 | 8 |
9 | 1001 | 11 | 9 |
10 | 1010 | 12 | a |
11 | 1011 | 13 | b |
12 | 1100 | 14 | c |
13 | 1101 | 15 | d |
14 | 1110 | 16 | e |
15 | 1111 | 17 | f |
16 | 10000 | 20 | 10 |
17 | 10001 | 21 | 11 |
18 | 10010 | 22 | 12 |
19 | 10011 | 23 | 13 |
20 | 10100 | 24 | 14 |
21 | 10101 | 25 | 15 |
22 | 10110 | 26 | 16 |
23 | 10111 | 27 | 17 |
24 | 11000 | 30 | 18 |
25 | 11001 | 31 | 19 |
30 | 11110 | 36 | 1e |
35 | 100011 | 43 | 23 |
40 | 101000 | 50 | 28 |
45 | 101101 | 55 | 2d |
50 | 110010 | 62 | 32 |
55 | 110111 | 67 | 37 |
60 | 111100 | 74 | 3c |
100 | 1100100 | 144 | 64 |
This lesson is available 1816/1112 ;-)