Zephyrnet Logo

How To Convert Binary To Decimal

Date:

In this blog, we will learn about the four types of number systems, learn how to convert binary to decimal and what the various conversion methods are. So, without wasting any more time, let’s get started!

Introduction

In Mathematics, a number system is a way of representing numbers. There are four types of the number systems, which are:

  1. Binary Number System (Base – 2) 
  2. Octal Number System (Base – 8)
  3. Decimal Number System (Base – 10)
  4. Hexadecimal Number System (Base – 16)

Number system plays an important role mostly in all computer gadgets and especially in computer architecture. It is used by computer engineers, communication specialists, networking, and other professionals. Before moving on to binary to decimal conversion, let’s understand both the number systems.

What is a Binary Number System?

A Binary Number System is the simplest form of number system that uses only two digits that is 0 (zero) and 1 (one). It is also called as base 2 numeral system. This number is mostly used in computer architecture and electronic devices.

Examples of Binary Number System: 01, 101, 1110, 10011, 1011101, and so on.

What is a Decimal Number System?

A Decimal Number System is a representation of numbers from 0 to 9. The decimal number system is the most common number system used by the general public. These number systems are also known as the base 10 numeral system.

Example of Decimal Number System: 10, 121, 485, 8483, 82940, and so on.

What is Binary to Decimal Conversion?

Binary to decimal conversion is done to convert binary number system to decimal number system, which means base 2 numeral system are converted into base 10 numeral system. It is important to know binary to decimal conversion because of computer programming applications. So the machine can understand only binary number system in form of 0 and 1 whereas humans can easily understand decimal number system that includes all 10 digits. So, it is important to understand how to convert binary number systems into decimal number systems.

Binary to Decimal Conversion Methods

There are two main methods for converting binary number systems into decimal number systems. These methods are:

  1. Positional Notation
  2. Doubling

Conversion Using Positional Notation

  • Write the binary number and count the power of 2 from right to left, starting from 0 onwards.
  • Now each binary number has the corresponding power of 2 starting from right to left. So the most significant bit will have the highest power of 2. 
  • Add the product of the second step
  • The final answer will be converted into a decimal number that is base 10.

Example of Positional Notation

Binary Number: (101)2
1     0    1
1 x 22 + 0 x 21 + 1 x 20
4 + 0 + 1
(5)10
So, the decimal number of (101)2 is (5)10
Similar we can represent fractional binary number into decimals
Binary Number: (0.101)2
1    0    1 . 1     0    1
1 x 22 + 0 x 21 + 1 x 20 . 1 x 2-1 + 0 x 2-2 + 1 x 2-3
(4 + 0 + 1) . (0.5 + 0 + 0.125)
(5.625)10
So, the decimal number of (0.101)2 is (5.625)10

Conversion Using Doubling

Conversion using doubling is one of the simplest ways for converting binary numbers into decimal numbers. We need to take the most signification bit or leftmost digit of the number. Then multiply the digit by 2 and add the second leftmost bit and store the result. Similarly, we need to take the result and multiply it by 2 and take the third leftmost bit and update the result. This process will continue till we reach the least significant bit which is the rightmost bit. Since we are multiplying by 2 so this process is known as Doubling.     

Example of Doubling

Binary Number: (101)

= 1

= 1 x 2 + 0 = 2

= 2 x 2 + 1 = 5

So, the decimal number of (101)2 is (5)10

Binary to Decimal Formula

The formula to convert binary number system into decimal can be represented by,

A = xn * bn + xn-1 * bn-1 + ….. + x1 * b1 + x0 * b0

Where,

A represents the integer

x represents the digit value

b represents the base value

For Example :

(1000)2 = 1 x 23 + 0 x 22 + 0 x 21 + 0 x 20

Tabular Representation of Binary to Decimal Number 

Binary1 Decimal1 Binary2 Decimal2
0000 0 1000 8
0001 1 1001 9
0010 2 1010 10
0011 3 1011 11
0100 4 1100 12
0101 5 1101 13
0110 6 1110 14
0111 7 1111 15

How to Convert Binary to Decimal

Using Positional Notation

Examples:

1    0    0     0     1
= 1 x 24 + 0 x 23 + 0 x 22 + 0 x 21 + 1 x 20
= 16 + 0 + 0 + 0 + 1
= (17)10
  • (1000.101)2
1    0    0     0   .   1   0    1
= (1 x 23 + 0 x 22 + 0 x 21 + 0 x 20) . (1 x 2-1 + 0 x 2-2 + 1 x 2-3)
= (8 + 0 + 0) . (0.5 + 0 + 0.125)
= (8.625)10

Using Doubling

Examples:

1   0     0    1    1
= 1
= 1 x 2 + 0 = 2
= 2 x 2 + 0 = 4
= 4 x 2 + 1 = 9
= 9 x 2 + 1 = 19
= (19)10
  • (10000101)2
1   0   0   0   0   1   0   1
= 1
= 1 x 2 + 0 = 2
= 2 x 2 + 0 = 4
= 4 x 2 + 0 = 8
= 8 x 2 + 0 = 16
= 16 x 2 + 1 = 33
= 33 x 2 + 0 = 66
= 66 x 2 + 1 = 133
= (133)10

To Conclude

So, we saw how we can easily convert binary numbers into decimal number systems and it makes us easy to understand and read. Also, it is important to know that a binary number can also be a decimal number for example 10 can be a binary number because it has 0 and 1 but on the other hand, 10 can also be a decimal number because it is being created from digits 0-9. So to avoid this confusion always focus on the base value of that number such as (10)2 is a binary number because the base is 2 and (10)10 is a decimal number because the base is 10.  

spot_img

Latest Intelligence

spot_img