<<< Binary numbers and computer architecture | Index | Hexadecimal notation >>> |
The binary numbers are extremely unfriendly to humans. For example, decimal 123456 is binary 11110001001000000. So we need some alternative to binaries.
Unfortunately, number 10, which is commonly used by humans, is not a power of two: the nearest powers of 2 are 8 and 16. Both of these are commonly used as numbering bases in programming, called octal numbers and hexadecimal numbers, respectively.
Octal numbers:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ...decimal equivalents 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, ... | |__note that 8 is an illegal octal digit!
Hexadecimal numbers:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ...decimal equivalents
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F,
|
|__using letters to make up for more digits
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2A, 2B, 2C, 2D, 2E, 2F, ...
<<< Binary numbers and computer architecture | Index | Hexadecimal notation >>> |