Home » NUMBER SYSTEM » POSITIONAL NUMBER SYSTEM

# POSITIONAL NUMBER SYSTEM

In a positional number system, there are only a few called digits, and these digits represent different values depending on the position they occupy in the number. The value of each digit in such a number is determined by three consideration.

1. The digit itself.
2. The position of the digit in the number.
3. The base of the number system.

There are two main characteristics of all number systems that are suggested by the base of that number system. The base of a number system determines the total number of digits used in it. The first digit in each number system is always 0. Now the second characteristic is that the last single digit is always one less than the value of base. For example in Decimal system the base is 10 and the maximum single digit is 9 which is one less than 10.

Now there are mainly four Number Systems in the world of Computer science. These Number Systems are Binary, Octal, Decimal and Hexadecimal Number Systems.

## BINARY NUMBER SYSTEM

The Binary Number System is exactly like the Decimal Number System except that the value of base is 2 instead of 10. We have only two digits 0 and 1 that can be used in this System. We must note that the largest single digit is 1 which one less than 2. Again, each position in this system represents a specific power of base 2. In this System, the rightmost position or units place is 20 the second position from the right is 2’s or 21 and proceeding in this way we have 22 or 4’s position, 23 or 8’s position, 24 or 16’s position, and so on. Example of Binary numbers are 11112, 110101002 and 000010102. The first Binary number is a four bit binary number and the last two are 8 bit Binary numbers. A binary digit is often refered by bit which mean 0 or 1. A binary number having n bits is called a n-bit binary number. Examples of 4 bit and 8 bit binary numbers are written above. A table for 3 bit binary numbers with their decimal equivalent is shown below.

## REPRESENTATION OF SIGNED BINARY NUMBERS

When a Binary number is positive, the sign is represented by 0 and the magnitude by a positive binary number. When the number is negative, then sign is represented by 1 but the rest may be denoted in one of the three possible ways.

1. Signed Magnitude Representation
2. Signed 1’s Complement Representation
3. Signed 2’s Complement Representation

The signed magnitude representation of a negative number consist of the magnitude and a sign. In other two representation , the negative number is represented in either
1’s or 2’s complement of its positive value. As for example, consider the signed number 14 stored in an 8-bit register. +14 is represented by a sign bit of 0 in the leftmost position followed by the binary equivalent of 14. Binary equivalent of 14 is 00001110. Note that each of eight bits of the register must have a value and therefore 0’s must be inserted in the most significant positions following the sign bit. Although there is only one way to represent +14, there are three different ways to represent -14 with eight bits.
In signed magnitude representation, -14 is 1 0001110
In signed 1’s complement representation, -14 is 1 1110001
In signed 2’s complement representation, -14 is 1 1110010

The signed-magnitude representation of -14 is obtained from +14 by complementing only the sign bit. The signed 1’s complement representation of -14 is obtained by complementing all the bit of +14 including sign bit. Signed 2’s complement representation is obtained by taking the 2’s complement of +14 including sign bit. In all three cases sign bit is not changed. The signed magnitude representation is used in ordinary arithmetic but it can’t be employed into computer arithmetic.

### BINARY TO DECIMAL CONVERSION

The following steps are used to convert a Binary number having no fractional part into Decimal Number.

1. Determine the Position value of 20, 21, 22, 2and so on.
2. Multiply the obtained positional value with corresponding digit.
3. Sum the products calculated in the second step.

Q. Convert the Binary number 1101into Decimal number?
Since 11012 is a 4 bit Binary number therefore positional values from units are 1, 2, 4 and 8.
11012
= 1×23 + 1×22 + 0x21 + 1×20
= 1×8 + 1×4 + 0x2 + 1×1
= 8 + 4 + 0 + 1
= 1310
Thus Decimal equivalent of 11012 is 1310.

Now we will convert a binary number having fraction part into decimal Number. When we convert a non fraction binary number into decimal, we multiply the position values with the corresponding digits. But in case of fraction binary number, we divide the positional values with the corresponding digits. The positional values start from 2-1, 2-2 and 2-3 etc.

Q. Convert the Binary number 110.1012 into Decimal number?

110.1012
= 1×22 + 1×21 + 0x20 + 1×2-1 + 0x2-2 + 1×2-3
= 1×4 + 1×2 + 0x1 + 1/2 + 0/4 + 1/8
= 4 + 2 + 0 + 0.5 + 0 + 0.125
= 6.62510
Hence Decimal equivalent of 110.1012 is 6.6252

### BINARY TO OCTAL CONVERSION

To convert a Binary number into Octal number first we have to convert it into Decimal number then we have to convert the Decimal equivalent into Octal Number.

Q. Convert the Binary Number 1111into Octal number?
At first we will convert the Binary Number into Decimal. Steps to convert a binary number into Decimal is given above.

11112
= 1×23 + 1×22 + 1×21 + 1×20
= 1×8 + 1×4 + 1×2 + 1×1
= 8 + 4 + 2 + 1
= 1510
Now convert the Decimal number 1510 into Octal number.
15/8 = 1 and remainder 7
1/8 = 0 and remainder 1
Thus Octal equivalent  11112 is 178.

Now we will convert a fractional Binary number into Octal number.

Q. Convert the Binary number 110.0112 into Octal number?

Converting 110.0112 into Decimal.
110.0112
= 1×22 + 1×21 + 0x20 + 0x2-1 + 1×2-2 + 1×2-3
= 1×4 + 1×2 + 0x1 + 0/2 + 1/4 + 1/8
= 4 + 2 + 0 + 0 + 0.25 + 0.125
= 6.37510

Now convert 6.37510 into Octal number. 6.37510 can not be directly converted into Octal. First Convert 6 into Octal then 0.375 will be converted into Octal.

Since Octal equivalent of Decimal number 6 is also 6. Therefore 610 and 68 are equal. Now to convert 0.375 into Octal, we have to multiply this fraction number with 8 and we have to store the non fractional part of multiplication. This process will continue untill fraction number is either 0 or the fraction number repeats. Thus

0.375×8 = 3.0
Here non fractional part is 3 and fractional part is 0 thus octal equivalent of 0.37510 will be 0.38.
Therefore Octal equivalent of 110.0112 is 6.38.

### SHORTCUT METHOD FOR BINARY TO OCTAL CONVERSION

1. Divide the binary digits into group of three bits starting from the Right.
2. Now convert each group of three binary digits into one octal digit. Since decimal digits from 0 to 7 are equal to octal digits 0 to 7.

Q. Convert the Binary number 101110into Octal number?
The Binary number 101110can be divided into two groups of 3 bits as 101 and 110. Now convert 101 and 110 into decimal numbers.
1012
= 1×22 + 0x21 + 1×20
= 4 + 0 + 1
= 510
= 58
Since 510 and 58 are equal.

1102
= 1×22 + 1×21 + 0x20
= 4 + 2 + 0
= 610
= 68
Thus Octal equivalent of 1011102 is 568.

Q. Convert the Binary number 110101.111 into Octal number?

Dividing the Binary number into group of 3 digits as 110, 101 and 111. Now we will convert each group into Decimal.

1102
= 1×22 + 1×21 + 0x20
= 1×4 + 1×2 + 0x1
= 4 + 2 + 0
= 610
= 68

1012
= 1×22 + 0x21 + 1×20
= 1×4 + 0x2 + 1×1
= 510
= 58

1112
= 1×22 + 1×21 + 1×20
= 1×4 + 1×2 + 1×1
= 4 + 2 + 1
= 710
= 78
Now Octal equivalent of 110101.1112 is 65.78.

To Convert a Binary number into Hexadecimal number first convert it into Decimal number then convert Decimal number into Hexadecimal number.

Q. Convert binary number 110101into Hexadecimal number?
Converting 1101012 into Decimal number
1101012
= 1×25 + 1×24 + 0x23 + 1×22 + 0x21 + 1×20
= 1×32 + 1×16 + 0x8 + 1×4 + 0x2 + 1×1
= 32 + 16 + 0 + 4 + 0 + 1
= 5310
Now convert Decimal number 5310 into Hexadecimal number.
53/16 = 3 and remainder 5
3/16 = 0 and remainder 3
Thus Hexadecimal equivalent of 1101012 is 3516.

### SHORTCUT METHOD FOR BINARY TO HEXADECIMAL CONVERSION

1. Divide the binary number into group of four digits starting from the Right
2. Convert each group of four binary digits into Decimal number. Decimal numbers from 010 to 1510 are equivalent to Hexadecimal numbers from 015 to 1515.

Q. Convert 11010011into hexadecimal number system?
Divide 110100112 into group of four digits as 1101 and 0011. Now convert 11012 and 00112 into Decimal number.
= 1×23 + 1×22 + 0x21 + 1×20
= 8 + 4 + 0 + 1
= 1310
= 1316
= D16

= 0x23 + 0x22 + 1×21 + 1×20
= 0 + 0 + 2 + 1
= 310
= 316
Hence 110100112 = D316

## OCTAL NUMBER SYSTEM

In Octal Number System, the base is 8. We have only eight digits that are 0, 1, 2, 3, 4, 5, 6 and 7 in this Number System. The largest single digit is 7 and the smallest digit is 0. Again, each position in an octal Number represents a different power of base 8. In this System, the rightmost position is 80, the second position from the right is the 81 and proceeding in this way we have 82, 83, 84 and so on. Thus, an example of Octal Number is 20578.

### OCTAL TO BINARY CONVERSION

To convert an Octal number into a Binary number, at first Octal Number has to be converted into Decimal and then Decimal number will be converted into Binary number.

Q. Convert given Octal Number 1238 into Binary Number?
Converting 1238 into Decimal Number
1238
= 1×82 + 2×81 + 3×80
= 1×64 + 2×8 + 3×1
= 64 + 16 + 3
= 8310
Now convert 8310 into Binary Number.
83/2 = 41 and remainder 1
41/2 = 20 and remainder 1
20/2 = 10 and remainder 0
10/2 = 5 and remainder 0
5/2 = 2 and remainder 1
2/2 = 1 and remainder 0
1/2 = 0 and remainder 1
Thus Binary equivalent of 1238is 10100112.

Now we will convert a fractional Octal number into Binary number.

Q. Convert the Octal number 25.548 into Binary Number?

Converting 25.548 into Decimal number
25.548
= 2×81 + 5×80 + 5×8-1 + 4×8-2
= 2×8 + 5×1 + 5/8 + 4/64
= 16 + 5 + 0.625 + 0.0625
= 21.687510
Now convert 21.687510 into Binary number.
Converting 2110 into Binary.
21/2 = 10 and remainder is 1
10/2 = 5 and remainder is 0
5/2 = 2 and remainder is 1
2/2 = 1 and remainder is 0
1/2 = 0 and remainder is 1
Thus Binary Equivalent of 2110 is 101012.
Now converting 0.687510 into Binary.
0.6875×2 = 1.375
0.375×2 = 0.75
0.75×2 = 1.5
0.5×2 = 1.0
Thus Binary equivalent of 0.687510 is 0.10112.
Hence Binary Equivalent of Octal number 25.548 is 10101.10112.

### SHORTCUT METHOD FOR OCTAL TO BINARY CONVERSION

The following steps are used to convert an Octal number into Binary number.

1. Convert each Octal digit into 3 bit Binary number.
2. Combine all 3 bit Binary number groups to form a single Binary number.

Q. Convert the Octal number 2758 into Binary number?
Converting each Octal digit into 3 bit Binary number
28 = 0102
78 = 1112
58 = 1012
Now we will combine all Binary equivalent of each Octal digits.
Thus Binary equivalent of 2758 is 0101111012.

### OCTAL TO DECIMAL CONVERSION

There are three steps to change an Octal Number into Decimal Number.

1. Obtain positional value of each position. Positional values from unit place are 1, 8, 64, 512 etc.
2. Multiply positional values with the corresponding digits.

Q. Convert given Octal Number 2057into Decimal Number?
20578
= 2×83 + 0x82 + 5×81 + 7×80
= 2×512 + 0x64 + 5×8 + 7×1
= 1024 + 0 + 40 + 7
= 107110
Thus Decimal equivalent of 2057is 107110.

Q. Convert the fractional Octal number 127.548 into Decimal number?

Converting 127.548 into Decimal number
127.548
= 1×82 + 2×81 + 7×80 + 5×8-1 + 4×8-2
= 1×64 + 2×8 + 7×1 + 5/8 + 4/64
= 64 + 16 + 7 + 0.675 + 0.0675
= 87.687510
Hence Decimal equivalent of 127.548 is 87.687510.

Repeat same process for Octal to Hexadecimal conversion as we have done in the case of Octal to Binary. First convert the Octal Number into Decimal number and then convert Decimal number into Hexadecimal number.

Q. Convert Octal number 34718 into Hexadecimal Number?
Convert 34718 into Decimal number
= 3×83 + 4×82 + 7×81 + 1×80
= 3×512 + 4×64 + 7×8 + 1×1
= 1536 + 256 + 56 + 1
= 184910
Now convert 184910 into Hexadecimal number
1849/16 = 115 and remainder 9
115/16 = 7 and remainder 3
7/16 = 0 and remainder 7

Q. Convert the fractional Octal number 235.548 into Hexadecimal number?

At first we need to convert 235.548 into Decimal number. Thus Decimal equivalent of 235.548 as found.

235.548
= 2×82 + 3×81 + 5×80 + 5×8-1 + 4×8-2
= 2×64 + 3×8 + 5×1 + 5/8 + 4/64
= 128 + 24 + 5 + 0.675 + 0.0675
= 157.687510

Now we have to convert 157.687510 into Hexadecimal number. Here we convert 15710 first then 0.687510 into Hexadecimal one by one.
Thus hexadecimal equivalent of 15710 is found as.
157/16 = 9 and remainder is 13 which is equal to D in Hexadecimal system
9/16 = 0 and remainder is 9
Now we will convert 0.6875 into Hexadecimal number.
0.6875×16 = 11.0 or B.0 because in hexadecimal system 11 is equivalent to B.
Therefore Hexadecimal equivalent of 0.687510 is 0.B16.
Hence Hexadecimal equivalent of Octal number 235.548 is 9D.B16.

## DECIMAL NUMBER SYSTEM

The number system that we use in our daily life is called the Decimal number system. In Decimal Number System the base is equal to 10 because there are ten digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 are used. We know that in this system the successive positions to the left of the decimal point represents units, tens, hundreds, thousands, ten thousands and so on. We have never give much attention to the fact that each position of a Decimal number represents a different power of base 10. For example the decimal number 3452 also can be written as 345210 is consisted of the digit 2 in  unit place, 5 at tens place, 4 at hundreds place and 3 at thousands place. Thus 3452 can be written as.

3452
= 3×1000 + 4×100 + 5×10 + 2×1
= 3×103 + 4×102 + 5×101 + 2×100

### DECIMAL TO BINARY CONVERSION

In the Binary system, the base is 2 and only two numerals 0 and 1 are required to represent a Binary number. The numerals 0 and 1 have the same meaning as in the Decimal system, but a different interpretation is assigned to the position occupied by a digit. The following five steps are used to convert a number from Decimal to Binary.

1. Divide the Decimal number by the base 2.
2. Record the remainder from step 1 as the rightmost digit of the binary number.
3. Divide the quotient of the previous divide by the base 2.
4. Record the remainder from step 3 as the next digit of the binary number.
5. Repeat the 3 and 4, recording remainders from right to left, until the quotient becomes zero in step 3. The last remainder will be the most significant digit of the binary number.

Q. Convert the given Decimal Number 4210 into its equivalent Binary Number?
42/2 = 21 and remainder 0
21/2 = 10 and remainder 1
10/2 =   5 and remainder 0
5/2 =   2 and remainder 1
2/2 =   1 and remainder 0
1/2 =   0 and remainder 1
Hence equivalent Binary number is 1010102.

Q. Convert the Decimal number 15.62510 into Binary Number?

The Decimal number 15.62510 is fractional number. So we have to convert 15 and 0.625 into Binary number separately. And then we will write their equivalent binary values together.
Converting 1510 into Binary number
15/2 = 7 and remainder is 1
7/2 = 3 and remainder is 1
3/2 = 1 and remainder is 1
1/2 = 0 and remainder is 1
So Binary equivalent of 1510 is 11112.
Now we will convert 0.62510 into Binary.
0.625×2 = 1.25
0.25×2 = 0.5
0.5×2 = 1.0
Write the integer values of each multiplication from top. Thus Binary equivalent of 0.62510 is 0.1012.
Hence Binary equivalent of 15.62510 is 1111.1012.

### DECIMAL TO OCTAL CONVERSION

To convert a Decimal number into Octal repeat the steps of Decimal to Binary conversion but divide the Octal number with 8.

Q. Convert the Decimal number 15610 into Octal number?
156/8 = 19 and remainder 4
19/8 = 2 and remainder 3
2/8 = 0 and remainder 2
Thus Octal equivalent is 2348.

Q. Convert the Decimal number 123.8510 into Octal number?
First we will convert 12310 into Octal number then 0.8510 into Octal.
Converting 12310 into Octal
123/8 = 15 and remainder is 3
15/8 = 1 and remainder is 7
1/8 = 0 and remainder is 1
Thus Octal equivalent of 12310 is 1738.
Now converting 0.8510 into Octal
0.85×8 = 6.8
0.8×8 = 6.4
0.4×8 = 3.2
0.2×8 = 1.6
0.6×8 = 4.8
0.8×8 = 6.4
Since 6.4 is repeated so we will not multiply further. Thus Octal equivalent of 0.8510 is 0.663148. Hence Octal equivalent of 123.8510 is 173.663148.

Repeat the steps of Decimal to Binary conversion but divide the number with 16 each time.

Q. Convert 17810 into Hexadecimal number?
178/16 = 11 and remainder 2
11/16 = 0 and remainder 11 or B(11 is equivalent to B in Hexadecimal)

Q. Convert the fractional Decimal number 1694.687510 into Hexadecimal number?
1694/16 = 105 and remainder is 14 which is equal to E
105/16 = 6 and remainder is 9
6/16 = 0 and remainder is 6
Therefore Hexadecimal equivalent of Decimal number 169410 is 69E16.
Now we will convert 0.6875 into Hexadecimal number.
0.6875×16 = 11.0 or B.0 because in hexadecimal system 11 is equivalent to B.
Therefore Hexadecimal equivalent of 0.687510 is 0.B16.
Hence Hexadecimal equivalent of Decimal number 1694.687510 is 69E.B16.

The hexadecimal Number System is one with a base of 16 .We have 16 different symbols or digits that are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and the remaining six digits are denoted by A, B, C, D, E, F. From letter A to F they represent the Decimal values 10, 11, 12, 13, 14, 15 respectively. In the hexadecimal Number System, there, the letters A through F are Number digits. A has a decimal equivalent value of 10 and the hexadecimal F has a decimal equivalent value of 15. Note that the largest digit is F or 15. Again, each position in Hexadecimal Number System represents a base of 16. In this System, the value of rightmost position is 160 or 1, the value of second position from the right is the 161 or 16 and proceeding in this way we have 162 or 256, 163 or 4096, 164 or 65536, and so on. Thus, an example of hexadecimal Number is 1AF which is also written as 1AF16.

Convert the Hexadecimal number into Decimal then convert Decimal number into Binary number.

Q. Convert the Hexadecimal C616 into Binary?
Solution: Convert C616 into Decimal number.
C616
= Cx161 + 6×160
= 12×16 + 6×1
= 192 + 6
= 19810
Now convert 19810 into Binary number.
198/2 = 99 and remainder 0
99/2 = 49 and remainder 1
49/2 = 24 and remainder 1
24/2 = 12 and remainder 0
12/2 = 6 and remainder 0
6/2 = 3 and remainder 0
3/2 = 1 and remainder 1
1/2 = 0 and remainder 1
Thus Binary equivalent is 110001102.

Q. Convert fractional Hexadecimal 12B.D16 into Binary?

Convert 12B.D16 into Decimal number
12B.D16
= 1×162 + 2×161 + Bx160 + Dx16-1
= 1×256 + 2×16 + 11×1 + 13/16
= 256 + 32 + 11 + 0.8125
= 299.812510
Now we will convert 299.812510 into Binary number.
Converting 29910 into Binary number
299/2 = 149 and remainder is 1
149/2 = 74 and remainder is 1
74/2 = 37 and remainder is 0
37/2 = 18 and remainder is 1
18/2 = 9 and remainder is 0
9/2 = 4 and remainder is 1
4/2 = 2 and remainder is 0
2/2 = 1 and remainder is 0
1/2 = 0 and remainder is 1
Thus Binary equivalent of 29910 is 1001010112.
Now converting 0.812510 into Binary numbers
0.8125×2 = 1.625
0.625×2 = 1.25
0.25×2 = 0.5
0.5×2 = 1.0
Therefore Binary Equivalent of 0.812510 is 0.11012.
Hence Binary equivalent of 12B.D16 is 100101011.11012.

### SHORTCUT METHOD FOR HEXADECIMAL TO BINARY CONVERSION

The following steps are used to convert in this method.

1. Convert each Hexadecimal digit into 4 digits Binary number.
2. Combine all groups of 4 digits binary numbers into a single Binary number.

Q. Convert Hexadecimal 2AC16 into Binary?
Converting each hexadecimal digit into Binary.
216 = 210 = 00102
A16 = 1010 = 10102
C16 = 1210 = 11002
Now combine all Binary groups to obtain the equivalent Binary number.
Hence Binary equivalent of 2AC16 is 0010101011002 or 10101011002.

Convert the Hexadecimal number into Decimal number then convert Decimal number into Octal number.

Q. Convert the Hexadecimal number 15516 into Octal number?
Solution: First convert 15516 into Decimal.
15516
= 1×162 + 5×161 + 5×160
= 1×256 + 5×16 + 5×1
= 256 + 80 + 5
= 34110
Now convert 34110 into Octal number.
341/8 = 42 and remainder 5
42/8 = 5 and remainder 2
5/8 = 5 and remainder 5
Thus Octal equivalent is 5258.

Converting a fractional Hexadecimal number into Octal number.
Q. Convert fractional Hexadecimal 2A3.416 into Octal?
Converting fractional Hexadecimal 2A3.416 into Decimal.
2A3.416
= 2×162 + Ax161 + 3×160 + 4×16-1
= 2×256 + 10×16 + 3×1 + 4/16
= 675.2510
Now convert 675.2510 into Octal. This conversion will be done in two steps. In first step 67510 will be converted into Octal and in second step 0.2510 will be converted into Octal.
Therefore Octal equivalent of 67510 is found as.
675/8 = 84 and remainder is 3
84/8 = 10 and remainder is 4
10/8 = 1 and remainder 2
1/8 = 0 and remainder 1
Now write the remainders from bottom to top. Therefore Octal equivalent of 67510 is
12438.
Now we will convert 0.2510 into Octal.
0.25×8 = 2.0
Thus Octal equivalent of 0.2510 is 0.28.
Hence Octal equivalent of 2A3.416 is 1243.28

Q. Convert 1AF16 into Decimal number?
Solution: Decimal equivalent of 1AF16 is given below.
1AF16
= 1×162 + Ax161 + Fx160
= 1×256 + 10×16 + 15×1
= 256 + 160 + 15
= 43110
Thus we can write 1AF16 = 43110.

Converting a fractional Hexadecimal into Decimal.
Q. Convert the fractional Hexadecimal B2B.A516 into Decimal?
Converting B2B.A516 into Decimal.
B2B.A516
= Bx162 + 2×161 + Bx160 + Ax16-1 + 5×16-2
= 11×256 + 2×16 + 11×1 + 10/16 + 5/256
= 2816 + 32 + 11 + 0.625 + 0.01953125
= 2859.6445312510