What is Number System : Types and Examples
In digital electronics, a mathematical value or a number is used to measure or count different objects and to perform arithmetic calculations. Numbers are available in different categories like whole numbers, natural numbers, integers, rational, irrational, fractions, primer, real, imaginary, composite, etc. Similarly, a number system is used to execute mathematical computations from normal calculations to scientific ones. These are available in different types based on the value of base for its digits and they have different properties. This article discusses an overview of a number system, types, and its working with examples.
What is Number System?
A number system or system of numeration can be defined as a representation of numbers by using symbols or digits in a consistent way. Here, symbols range from 0 to 9 which are called digits. In this system, any digit value can be determined through a digit, the base & its position within the number. The numbers are symbolized in a unique way & allow us to perform arithmetic operations like addition, division & subtraction.
Types of Number System
There are different types of number systems in which the four main types are:
- Binary Number System
- Decimal Number System
- Octal Number System
- Hexadecimal Number System
Binary Number System
If the number system has a base-2 value, then it is known as a binary number system. This system uses two digits like 0 & 1 for the making of numbers. So, when the numbers are formed by using these two digits are known as binary numbers. This type is used in computer systems, electronic devices because it can perform easily through two states like ON or 1 & OFF or 0.
The decimal numbers from 0 to 9 are signified in binary as 0, 1, 10 (2), 11 (3), 100 (4), 101 (5), 110 (6), 111 (7), 1000 (8) & 1001 (9).
Example:
An example of the binary number system – Converting the decimal number 19 to binary.
Dividend |
Remainder |
19/2 = 9 |
1 |
9/2 = 4 |
1 |
4/2 = 2 |
0 |
2/2 = 1 |
0 |
Now, the remainder must write from bottom to top which is known as in reverse chronological order, so the value is (10011)2. Thus, the decimal number 19 in binary is 10011 = 19. Here, the LSB is 1 & the MSB is 1.
So, if we want to get the bits in binary numbers, we have to calculate the number of one’s & zeros. As a result, 19 in binary is (10011)2, there are 3 ones and 2 zeroes, so we have 5 bits. Thus, the number of bits do 19 in binary has is 5.
Decimal Number System
If the number system has a base-10 value then it is known as the decimal number system. This system uses 0 to 9 digits for making the numbers. Here, every digit within the number is at an exact position with position value a product of different powers of 10.
In this type, the numbers are signified by base 10, which is known as decimal notation. This is applicable in computer applications. This system is also known as the base-10 number system because it includes 10 digits from 0 to 9.
Every digit within the decimal system includes a position and it is more significant ten times than the earlier digit. For instance, 16 is a decimal number, and then 1 is ten times above 6. Some examples are; (15)10, (247)10, (109)10, (220)10, (25.9)10.
Example:
The example of this system is explained below.
1). In the 1237 decimal number, the digit 7 is in the position of units, the digit 3 is in the 10’s position, the digit 2 is in the 100’s position & 1 is in the 1000’s position. So this value can be written as
(1×10^3) + (2×10^2) + (3×10^1) + (7×10^0)
(1×1000) + (2×100) + (3×10) + (7×1)
1000 + 200 + 30 + 7 = 1237.
2). In the decimal number, when the digits are present after the decimal point (.) on the right side then each digit is multiplied with decreasing power of 10 like 1/10, 1/20, etc. Some examples are:
(231.352)10 = 2×10^2+3×10^1+1×100+3×10^-1+5×10^-2+2×10^-3
Octal Number System
The number system which has the base value ‘8’ is known as the octal number system. This system uses eight digits from 0 to 7 to form octal numbers. The conversion of octal numbers to decimal numbers can be done by multiplying every digit with the position value & after that adding the outcome. Here the position values are 8^0, 8^1, & 8^2. These are very useful in representing UTF8 Numbers.
Example:
The example of this system is explained below.
(132)_{8} = 1×8^0+3X8^1+2X8^2 = 1+24+128 = 153.
Hexadecimal Number System
The number system which has base-16 is known as the hexadecimal number system. So the possible symbols or digit values are 16 like 0 to 9 and after that, it is A, B, C, D, E & F. Here, 10 to 15 values are represented with A to F. It needs simply four bits to signify any digit. Hexadecimal numbers are mainly represented through the addition of either a prefix ‘0x’ or a suffix ‘h’.
Each digit position has a weight like the power of 16. Every position within the Hexadecimal system is 16 times more important than the earlier position that means a hexadecimal number’s numeric value can be determined by multiplying every digit of the number by the value of the position where the digit appears and then adding the products. So, it is also a positional number system. The representation of the Hexadecimal number is shown in the following tabular form.
Binary |
Hex Digit |
0000 |
0 |
0001 |
1 |
0010 |
2 |
0011 |
3 |
0100 |
4 |
0110 |
5 |
0110 |
6 |
0111 |
7 |
1000 |
8 |
1001 |
9 |
1010 | A |
1011 | B |
1100 | C |
1101 | D |
1110 | E |
1111 | F |
Example
The example of this system is explained below.
When the base value of this number system is 16, then the maximum digit value is 15, so it cannot be above 15. In this type, the consecutive positions toward the left side of the hexadecimal point include weights like 16^0, 16^1, 16^2, 16^3, etc. In the same way, the consecutive positions toward the right side of the hexadecimal point include weights like 16^-1, 16^-2, 16^-3, etc. So this is known as base power of 16.
Here, any Hexadecimal number’s decimal value can be decided through the sum of the product of each digit by its positional value.
(512)_{16}
(512)_{16} = 2×16^2+0x16^1+0x16^0 = 200
So, decimal value 512 is equal to 200 in Hexadecimal Number System. In the above value, the rightmost bit is ‘0’ which is called the LSB (least significant bit) whereas the leftmost bit like ‘2’ is known as the MSB (most significant bit).
Conversion of Number System
The number system conversion is the process used to change one base number to another base number like binary, decimal, hexadecimal & octal through some examples. Here, the base numbers of these systems are for decimal base -10, binary – base-2, octal base-8, and for hexadecimal –base-10. The different conversion methods are listed below.
1). The conversion of binary number system includes the following.
2). The conversion of decimal number system includes the following.
- Decimal to Binary Conversion
- Decimal to Octal Conversion
- Decimal to Hexadecimal Conversion
3). The conversion of the octal number system includes the following.
- Octal to Binary Conversion
- Octal to Decimal Conversion
- Octal to Hexadecimal Conversion
4). The conversion of the hexadecimal number system includes the following.
- Hexadecimal to Binary Conversion
- Hexadecimal to Decimal Conversion
- Hexadecimal to Octal Conversion
From the above conversions, here we are explaining one of the conversions of the numbering system like conversion of binary which includes binary to decimal, octal, hexadecimal.
Binary to Decimal Conversion
To convert binary number to decimal, we have to multiply each digit in the binary number with its base increased to the power depending on its position. So, this can be done by the first digit from the rightmost & moving to the left side & adding all the values.
(11001011)_{2} = (1 × 2^0)+ (1 × 2^1)+ (0 × 2^2)+ (1 × 2^3) + (0 × 2^4) + (0 × 2^5) + (1 × 2^6) + (1 × 2^7)
= 1 + 2 + 0 + 8 + 0 + 0 + 64 +128 = 203
Binary to Octal Conversion
To convert the binary number to octal, first, we need to convert the number from binary to decimal then the decimal number is converted to the octal. The example is (101011)2.
The example binary number is (101011)_{2}.
First, binary number has to convert to decimal like the following.
(101011)_{2 }= (1×2^5)+(0x2^4)+(1×2^3)+(0x2^2)+ (1×2^1)+ (1×2^0)
= 1X32+0+8+0+2+1 = 43
(101011)_{2 }= 43 (Decimal form)
Now, this decimal number is converted into an octal number.
Decimal number (43)_{8 }to Octal
Therefore, the octal number is (52)_{8}
Binary to Hexadecimal Conversion
The conversion of binary (base-2) to hexadecimal (base-16) can be done by converting every group of four binary bits into decimal. After that decimal to hexadecimal So first we have to separate every four bits, binary group. After that, the divided groups are simply converted into decimal numbers independently. Now we can get the required equal hexadecimal number for the binary number. For example, the binary number is 100101011011.
This number has to divide into equal groups for every 4 digits.
1001|0101|1011
Once the above number is converted into decimal numbers separately then we can get the below value.
9 | 5 | 11
So the desired hexadecimal equivalent of the binary number (100101011011)2 is (95B)16
What is used to convert one type of number system into another?
Conversion methods are used to convert one type of number system to another.
How do you convert a number to a different base?
The steps involved in converting a number into a different base are:
First, to get the remainder, we need to divide the number through the base number. This remainder is the LSB of the new number within the other base. After that, do again the process by dividing the quotient of step-1 through the new base.
What is a base conversion?
In mathematics, changing numeral bases like converting from binary (base 2) to decimal (base 10) is known as base conversion.
Which number system is used in the digital system?
Then binary numbering system is used in digital systems because it uses simply two digits like 1s & 0s to form different figures.
What is the digital value of a number?
The characteristic value which is assigned to a number is known as the Digital value. The digital value of a number can be denoted with x by //x// (or) by dval(x).
Thus, this is all about an overview of the number system (numeral system), types, and their working with examples. Here is a question for you, what are the applications of a number system?