Decimal | Hexadecimal |
0 | 0 |
1 | 1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 5 |
6 | 6 |
7 | 7 |
8 | 8 |
9 | 9 |
10 | A |
11 | B |
12 | C |
13 | D |
14 | E |
15 | F |
Lets take the same number as last lesson on binary 3,791 as an example. In hexadecimal that value is ECF. To get a better understanding why the value is what it is, lets convert it to binary. Each digit in hexadecimal can be represented with 4 bits like so:
Binary | Hexadecimal |
0000 | 0 |
0001 | 1 |
0010 | 2 |
0011 | 3 |
0100 | 4 |
0101 | 5 |
0110 | 6 |
0111 | 7 |
1000 | 8 |
1001 | 9 |
1010 | A |
1011 | B |
1100 | C |
1101 | D |
1110 | E |
1111 | F |
So in turn the number ECF in binary is:
E | C | F |
1110 | 1100 | 1111 |
As you can see it is identical to the previous lesson, the result being 111011001111. You can also use the place value method as well similar to the binary and decimal system but again the place values are different. You again start with 1 and each number afterward is a power of 16.
256 | 16 | 1 |
E | C | F |
More information can be obtained here : http://en.wikipedia.org/wiki/Hexadecimal
No comments:
Post a Comment