Binary to Decimal Conversion



Binary to Decimal Conversion

We can convert a binary number into its equivalent decimal number by using the positional weights method.

In this method of binary to decimal conversion, each digit of the given binary number is multiplied by its positional weight. Then, all the products are added to obtain the equivalent decimal number.

The step-by-step process of converting a binary number to its equivalent decimal number by using positional weights method is explained below −

Step 1 − Write the positional weights for each binary digit.

Step 2 − Multiply each binary digit with its positional weight.

Step 3 − Add the product terms to obtain the equivalent decimal number.

Let us consider some examples to understand the binary to decimal conversion.

Example 1

Convert (101101)2 into decimal equivalent.

Solution

The given binary number is (101101)2

Step 1 − Defining positional weights for the given binary number −

Bits 1 0 1 1 0 1
Weights 25 24 23 22 21 20

Step 2 − Calculating product of bits and positional weights −

Bits Weights Multiply Product
1 25 1 × 32 32
0 24 0 × 16 0
1 23 1 × 8 8
1 22 1 × 4 4
0 21 0 × 2 0
1 20 1 × 1 1

Step 3 − Add all the product terms to obtain the equivalent decimal number −

Decimal Number = 32 + 0 + 8 + 4 + 0 + 1 = (45)10

Hence, the decimal equivalent of (101101)2 is (45)10.

Example 2

Convert (1111011)2 into decimal equivalent.

Solution

Multiplying Bits with positional weights, we get,

Decimal Number = 1 × 26 + 1 × 25 + 1 × 24 + 1 × 23 + 0 × 22 + 1 × 21 + 1 × 20

Decimal Number = 64 + 32 + 16 + 8 + 0 + 2 + 1 = (123)10

Hence, the decimal equivalent of (1111011)2 is (123)10.

Example 3

Convert (1001.11)2 into decimal.

Solution

The given binary number has integer and fractional parts. The integer part is multiplied with positive weights, while the fractional part is multiplied with negative weights as follows −

Decimal Number = 1 × 23 + 0 × 22 + 0 × 21 + 1 × 20 + 1 × 2-1 + 1 × 2-2

Decimal Number = 8 + 0 + 0 + 1 + 0.5 + 0.25 = (9.75)10

Thus, the decimal equivalent of (1001.11)2 is (9.75)10.

Advertisements