To convert binary into decimal, each bit of the binary number is first multiplied with 2(n-1) where n is the position of the particular bit when counted from Least Significant Bit (LSB). The result so obtained are then added to get the equivalent decimal number.
We will discuss the entire process / method of converting a binary into decimal with the help of some example. Let us first formulate the various steps in the process.
Steps to convert Binary into Decimal:
The method for converting integer part and fraction part of the into binary is different. This essentially means that method for converting binary number in the left-hand side (LHS) of the decimal point and right hand side (RHS) of the decimal point are different. Therefore, the very first step is to separate the integer (LHS of decimal point) and fraction part (RHS of decimal point) of the given binary number. Then follow the steps for converting integer and fraction part of binary into decimal. Once, integer & fraction parts are converted into decimal, arithmetically add them to get the equivalent decimal number.
Steps for converting Binary No. at the LHS of Decimal Point into Decimal:
Step-1: Write down the binary number.
Step-2: Multiply each bit of the binary number with 2(n-1). Calculate the value of each such multiplication.
Step-3: Add the values of each multiplication result calculated in step-2. The result, thus, obtained is the decimal number corresponding to the integer part of the binary number i.e. Binary No. at the LHS of Decimal Point.
Steps for converting Binary No. at the RHS of Decimal Point into Decimal:
Step-4: Write down the binary number.
Step-5: Multiply each bit of the binary number with 2-p, where p is the position of the selected bit when counted from the decimal point. Calculate the value of each such multiplication.
Step-6: Add the values of each multiplication result calculated in step-5. The result, thus, obtained is the decimal number corresponding to the integer part of the binary number i.e. Binary No. at the RHS of Decimal Point.
Let us now take one example which will illustrate the entire process discussed above. Suppose, we are asked to convert (10101.101) into decimal. Well, we will follow the steps.
Step-1: Separate the integer and fraction part. This is shown below.
Step-2 & 3: Multiply each bit of the integer part of the binary number with 2(n-1). Calculate the value of each such multiplication and arithmetically add them together.
Step-4: The fraction part is (.101)
Step-5 & 6: Multiply each bit of the binary number with 2-p, where p is the position of the selected bit when counted from the decimal point. Calculate the value of each such multiplication and arithmetically add them.
Finally, add the values obtained in step-2&3 and Step-5&6 i.e. (21 + 0.625) = 21.625. This is the equivalent decimal of binary number (10101.101).