Site icon TestingDocs.com

Binary to Decimal number Conversion

Overview

In this tutorial, we will learn to convert a binary to a decimal number. The binary number is base 2 and the decimal number is base 10.

Binary to Decimal Conversion

We can convert a binary number to a decimal number by multiplying the digits with 2 and by increasing the power of the 2 by 1 as we move from the least significant binary digit to the upper binary digits. The least significant binary digit is multiplied by 2^0. We add all the results to get the decimal equivalent of the binary number.

Example

Let’s understand the concept with an example. We will convert the following binary number to the decimal equivalent number.

100101

Write down the binary number:

1    0     0   1   0   1

Write down the multiplication factors from right to left starting from the least significant binary digit.

 

1                   0                  0                      1                         0                     1

2^5             2^4            2^3                   2^2                  2^1                  2^0

Multiply with the respective binary digits:

1                             0                           0                      1                              0                          1

2^5=32             2^4=16            2^3=8                   2^2=4                  2^1=2                  2^0=1

 

1                0              0                   1                0                   1

X               X              X                  X               X                  X

32             16            8                   4                 2                  1

 

 

 

The decimal equivalent number of the binary =

1*32 + 0*16 + 0*8 + 1*4 + 0*2 + 1*1

= 32 + 0+ 0 + 4 + 0 + 1

= 32 + 4 + 1

= 32 + 5

= 37

Exit mobile version