We communicate with each other through a language that comprises of words and characters. We understand characters, words, and numbers. But is this type of data or language accepted by computers? No, they only understand numbers.
When the data is entered by us into a computer, it is converted into electronic pulse. Each pulse is assigned a code and the ASCII converts the code into numeric format. It gives each character, number and symbol, a numerical value so that the computer could understand it. Hence, it is important to understand the number systems in order to learn the language of computers.
Following number systems are used in computers:
- Binary number system
- Octal number system
- Decimal number system
- Hexadecimal number system
Binary Number system
It comprises of only two digits ‘0’ and ‘1’, hence its base is 2. There are just two types of electronic pulses present in this number system: presence of electronic pulse which represents ‘1’ and absence of electronic pulse which represents ‘0’. Each digit is known as a bit. There can be two groups of bits, a group of four bits (1101) which is known as a nibble and a group of eight bits (11001010) which is known as a byte. In a binary number, the position of each bit represents a particular power of the base (2) of the number system.
Octal number system
Because it contains eight digits (0, 1, 2, 3, 4, 5, 6, 7), its base is 8. In an octal number system, each digit represents a particular power of its base (8). Three bits (23=8) of binary number system are enough for converting any octal number into a binary number because there are only eight digits in this number system. For shortening long binary numbers, the octal number system is used. A single octal digit can represent three binary digits.
Decimal number system
There are ten digits (0, 1. 2, 3, 4, 5, 6, 7, 8, 9) in this number system hence, its base is 10. The maximum value of a digit can be 9 and the minimum value can be 0. A specific power of the base (10) of the number system is represented by the position of each digit in the decimal number. This is a more commonly used number system, in daily lives, than the above two. Any numeric value can be represented by this number system.
Hexadecimal Number system
There are 16 digits in this number system that range from 0 to 9 and A to F. hence, its base is 16. 10 to 15 decimal numbers are represented by the alphabets A to F. A specific power of the base (16) of the number system is represented by the position of each digit in a hexadecimal number. Since there are only sixteen digits present in this number system, any hexadecimal number can be converted into a binary number by four bits (24=16) of binary number system. Another name of this number system is alphanumeric number system because it uses both alphabets and numeric digits.