The computer understands machine language which stores data in form of bits or binary digit. A computer is unable to understand any other language and so it uses a compiler which converts any language into machine language. A computer is able to store and process any text, graphics, video, etc. in binary numbers only and so number system is used to represent anything in the computer.
The computer understands a positional system where digits are positioned at different positions. The most common number system used by a computer is a binary system. So, while using any other number system it needs to be converted into binary and vice versa so that computer and human are able to understand it.
Different Types of Number System
The four most common Number system is the Decimal System, Octal system, Binary system, and Hexadecimal system.
- Binary Number System
Binary number system uses only two digits which are 0 and 1. It is also known as a base 2 number system where 1 is for “on” state while 0 is for “off” state. 0 is for low voltage transmission of signals. Every binary digit that is used in number system i.e. is 0 and 1 is called a bit. The binary system is also a positional number system where digits are expressed in form of power to the base 2 for e.g. 20, 21, etc.
In a binary system, the rightmost digit is called least significant but while leftmost is the most significant bit. It is possible to convert decimal to binary and vice versa as required.
E.g.: 101012 = ((1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20))10
- Decimal System
It is one of the most general number system which uses 0 to 9 numbers for representation. It has base 10 (100) and also has positional notation just like other system. Value of each digit will solely be dependent on their position.
E.g.: 456 will be represented as 6 x 100 + 5 x 101 + 6 x 102 = 6+50+600 = 656
- Octal System
The name itself says it uses 8 digits for representation of data and has 8 as the base (80). Each value is defined by its positional value.
E.g.: 4568 = 4×82 + 5×81 + 6×80 = 256+40+6 = 302
- Hexadecimal System
Hexadecimal is a positional number system with the base 16. It has 16 digits which are from 0 to 9 and also A to Here A defines 10, B =11, C= 12, D= 13, E=14, F=15.
E.g.: 46B16 = 4×162 + 6×161 + 10×160 = 1024 + 96 +10 = 1130
The Bottom Line
In all to the number, the system is used to convert human-readable form to computer readable form and vice versa. As computer understand only number system, it becomes important to convert every piece of data in the form which can help a computer to process it. Different numbers system is used for such language conversion between computer and human.