16 | 16 |
16 | 16 |
16 | 16 |
16 | 16 |
16 | 16 |
16 | 16 |
16 | 16 |
16 | 16 |
Hexa=6 (hexagonal, hexagram, etc.)
Decimal=10
Hexadecimal=16
In the hexadecimal system, 6 letters are added to the standard 0-9 Arabic Numerals, to give you a numbering system with base 16, instead of base ten.
Decimal: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Hexadecimal: 0 1 2 3 4 5 6 7 8 9 A B C D E F 10
Count from 0 to 9, then count A, B, C, D, E, F.
Then you reach 10 (hexadecimal 10, which corresponds to decimal 16).
Count again: 11, 12, 13, 14, 15, 16, 17, 18 , 19, then use 1 and a letter: 1A, 1B, 1C, 1D, 1E, 1F.
Then you reach 20 (hexadecimal 20, which corresponds to decimal 32).
This continues forever. For instance, B0 in hexadecimal corresponds to 176 in decimal: (B[hex] * 16[decimal]) + (0 * 1). Since B is 11 in decimal, this equation becomes (11 * 16) + (0 * 1) = 11 * 16 = 176.
Here are another few examples:
Hex. | = | Hex. equation | = | Decimal equation | = | Decimal |
C8 | = | (C * 10) + (8 * 1) | = | (12 * 16) + (8 * 1) | = | 200 |
FF | = | (F * 10) + (F * 1) | = | (15 * 16) + (15 * 1) | = | 255 |
100 | = | (1 * 10 * 10) + (0 * 10) + (0 * 1) | = | (1 * 16 * 16) + (0 * 16) + (0 * 1) | = | 256 |
To convert from decimal to hexadecimal, reverse this procedure. For instance, 178 in decimal corresponds to B2 in hexadecimal: 178 = (11 * 16) + (2 * 1) = (B * 10[hex.]) + (2 * 1) = B2. Here are another few examples:
Decimal | = | Decimal equation | = | Hex. equation | = | Hex. |
48 | = | (3 * 16) + (0 * 1) | = | (3 * 10) + (0 * 1) | = | 30 |
513 | = | (2 * 16 * 16) + (0 * 16) + (1 * 1) | = | (2 * 10 * 10) + (0 * 10) + (1 * 1) | = | 201 |
1,000 | = | (3 * 16 * 16) + (14 * 16) + (8 * 1) | = | (3 * 10 * 10) + (E * 10) + (8 * 1) | = | 3E8 |
Here are some more numbers in hexadecimal and decimal. Try converting one form to the other, and back again, until you are comfortable with the process.
Hex. | Dec. | . | Hex. | Dec. | . | Hex. | Dec. |
0 | 0 | 10 | 16 | C8 | 200 | ||
1 | 1 | 11 | 17 | F0 | 240 | ||
2 | 2 | 19 | 25 | FF | 255 | ||
9 | 9 | 1A | 26 | 100 | 256 | ||
A | 10 | 1B | 27 | 3E8 | 1,000 | ||
B | 11 | 1F | 31 | 1000 | 4,096 | ||
C | 12 | 20 | 32 | 10000 | 65,536 | ||
D | 13 | 32 | 50 | 100000 | 1,048,576 | ||
E | 14 | 64 | 100 | FFFFFF | 16,777,215 | ||
F | 15 | A0 | 160 | 1000000 | 16,777,216 |
If you would rather let the computer compute hexadecimal numbers, you can try this automatic converter.