In our everyday life we use decimal number system.
Its base is 10 because decimal number system has 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Example: 15_{10}, 162_{10}, 2013_{10}, 254.65_{10}, 12.12345_{10} etc.
Number -> | 2 | 0 | 1 | 3 |
Number -> | 1 | 2 | | | 3 | 4 | 5 |
Its base is 2 because binary number system has only 2 digits: 0, 1.
Computers use binary number system because it can read/store data using ON/OFF charge.
Example: 10_{2}, 111_{2}, 1011_{2}, 1101.001_{2} etc.
Its base is 8 because octal number system has 8 digits: 0, 1, 2, 3, 4, 5, 6, 7.
When a word consists of a number of bits divisible by 3, for example in an ancient system of 18-bits word size or 9-bits word size, or for a UNIX file permission, octal number system is used.
Example: 10_{8}, 111_{8}, 1056_{8}, 2734.077_{8} etc.
Its base is 16 because hexadecimal number system has 10 digits and 6 letters (total 16 characters): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
The decimal representation of the last 6 hexadecimal characters are: A_{16} = 10_{10}, B_{16} = 11_{10}, C_{16} = 12_{10}, D_{16} = 13_{10}, E_{16} = 14_{10}, F_{16} = 15_{10}.
When a word consists of a number of bits divisible by 4, hexadecimal number system is used. In reality it is widely used by computer scientists and programmers because it is a more human-friendly representation of a binary-coded value.
Example: 10_{16}, 1A9F_{16}, DE75.CB_{16} etc.