# Conversion of Binary Number System to Decimal Number System

Here, we are going to learn **how to binary number system to decimal number system?**

Submitted by Saurabh Gupta, on October 15, 2019

**Prerequisite:** Number systems

To **convert binary number to its respective decimal number** we use the place values or what we call the positional weights and multiply it with the corresponding bit and add them all together to obtain the decimal number.

- In an
**integral part of the binary number**, the weights follow the pattern as**2**,^{0}**2**,^{1}**2**,^{2}**2**,^{3}**2**,^{4}**2**and so on from right to left.^{5} - In the
**fractional part of the binary number**, the weights follow the pattern as**2**,^{-1}**2**,^{-2}**2**,^{-3}**2**,^{-4}**2**and so on from left to right.^{-5}

To **convert a mixed binary number**, we convert its integral and fractional part individually and then combine them to get the desired decimal number.

Let's take a few examples to understand the concept better.

**Example 1: Convert (101.11) 10**

**Solution:**

Now, after converting both integral part and fractional part separately, we combine them and get the desired decimal number for the binary number i.e., **(101.11) _{2} = (5.75)_{10}**

**Example 2: Convert (11011.101) 10**

**Solution:**

Now, after converting both integral part and fractional part separately, we combine them and get the desired decimal number for the binary number i.e., **(11011.101) _{2} = (27.625)_{10}**

TOP Interview Coding Problems/Challenges

- Run-length encoding (find/print frequency of letters in a string)
- Sort an array of 0's, 1's and 2's in linear time complexity
- Checking Anagrams (check whether two string is anagrams or not)
- Relative sorting algorithm
- Finding subarray with given sum
- Find the level in a binary tree with given sum K
- Check whether a Binary Tree is BST (Binary Search Tree) or not
- 1[0]1 Pattern Count
- Capitalize first and last letter of each word in a line
- Print vertical sum of a binary tree
- Print Boundary Sum of a Binary Tree
- Reverse a single linked list
- Greedy Strategy to solve major algorithm problems
- Job sequencing problem
- Root to leaf Path Sum
- Exit Point in a Matrix
- Find length of loop in a linked list
- Toppers of Class
- Print All Nodes that don't have Sibling
- Transform to Sum Tree
- Shortest Source to Destination Path

Comments and Discussions

**Ad:**
Are you a blogger? Join our Blogging forum.