Conversion from Decimal to other Number Systems
To convert a decimal number to any other number system (binary, octal, or hexadecimal), we can use the following steps:
- Divide the given number by the base value (b) of the number system in which it is to be converted
- Note the remainder
- Keep on dividing the quotient by the base value and note the remainder till the quotient is zero
- Write the noted remainders in the reverse order (from bottom to top)
Decimal to Binary Conversion- Since the base value of the binary system is 2, the decimal number is repeatedly divided by 2 following the steps given in above till the quotient is 0. Record the remainder after each division and finally write the remainders in reverse order in which they are computed.
E.g. Convert decimal number (122)10 to binary number
E.g. Convert decimal number (122)10 to binary number
E.g. Convert decimal number (20)10 to binary number
Therefore, (20)10 = (10100)2
E.g. Convert decimal number (135)10 to binary number
Therefore, (135)10 = (10000111)2
To get an equivalent decimal number we have to add the product of positional value and corresponding digit. Using the following steps we can convert a binary number to its equivalent decimal value as shown below.
Convert (1101)2 into a decimal number.Digit | 1 | 1 | 0 | 1 |
Position Number | 3 | 2 | 1 | 0 |
Positional Value | 23 | 22 | 21 | 20 |
Decimal Number | 1x23 + 1x22 + 0x21 +1x20 = 8 + 4 + 0 + 1 =13 |
Therefore, (1101)2 = (13)10
Digit | 1 | 0 | 1 | 1 |
Position Number | 3 | 2 | 1 | 0 |
Positional Value | 23 | 22 | 21 | 20 |
Decimal Number | 1x23 + 0x22 + 1x21 +1x20 = 8 + 0 + 2 + 1 =11 |
Therefore, (1011)2 = (11)10
E.g. Convert (1001)2 into a decimal number.
Digit | 1 | 0 | 0 | 1 |
Position Number | 3 | 2 | 1 | 0 |
Positional Value | 23 | 22 | 21 | 20 |
Decimal Number | 1x23 + 0x22 + 0x21 +1x20 = 8 + 0 + 0 + 1 = 9 |
Therefore, (1001)2 = (9)10
Converting
binary fractional to decimal
Using following steps, we can convert
binary fractional to decimal
E.g. To convert (110.101)2 i.e.
binary fractional number to decimal number, we can follow following steps:
Step 1: Conversion of 110 to decimal
Digit
1
1
0
Position
Number
2
1
0
Positional
Value
22
21
20
Decimal
Number
1x22 + 1x21 +0x20 = 4 + 2
+ 0 = 6
So equivalent decimal of binary integral
is 6.Step 2: Conversion of .101 to decimal
Digit
1
0
1
Position
Number
-1
-2
-3
Positional
Value
2-1
2-2
2-3
Decimal
Number
1x0.5 + 0x0.25 + 1x0.125 = 0.625
So equivalent decimal of binary fractional is 0.625Step 3: Add result of step 1 and 2.
6 + 0.625 = 6.625
Therefore, (110.101)2 = (6.625)10
Converting decimal fractional to binary
Using following steps, we can convert decimal fractional to binary
E.g. To convert (20.47)10 i.e. decimal fractional number to binary number, we can follow following steps:
Step 1: Conversion of 20 to binary So equivalent binary of 20 is 10100
Step 2: Conversion of .47 to binary
0.47 * 2 = 0.94, Integral part: 0
0.94 * 2 = 1.88, Integral part: 1
0.88 * 2 = 1.76, Integral part: 1
So equivalent binary of fractional part of decimal is .011
Step 3: Add result of step 1 and 2.
10100 + .011 = 10100.011 Therefore, (20.47)10 = (10100.011)2
UNIT-201
Using following steps, we can convert binary fractional to decimal
E.g. To convert (110.101)2 i.e. binary fractional number to decimal number, we can follow following steps:
Step 1: Conversion of 110 to decimal
Digit |
1 |
1 |
0 |
Position
Number |
2 |
1 |
0 |
Positional
Value |
22 |
21 |
20 |
Decimal
Number |
1x22 + 1x21 +0x20 = 4 + 2
+ 0 = 6 |
Digit |
1 |
0 |
1 |
Position
Number |
-1 |
-2 |
-3 |
Positional
Value |
2-1 |
2-2 |
2-3 |
Decimal
Number |
1x0.5 + 0x0.25 + 1x0.125 = 0.625 |
Therefore, (110.101)2 = (6.625)10
Using following steps, we can convert decimal fractional to binary
E.g. To convert (20.47)10 i.e. decimal fractional number to binary number, we can follow following steps:
Step 1: Conversion of 20 to binary
So equivalent binary of 20 is 10100
Step 2: Conversion of .47 to binary
0.47 * 2 = 0.94, Integral part: 0
0.94 * 2 = 1.88, Integral part: 1
0.88 * 2 = 1.76, Integral part: 1
So equivalent binary of fractional part of decimal is .011
Step 3: Add result of step 1 and 2.
10100 + .011 = 10100.011