# Binary to Decimal Converter

## Calculator

The following calculator will help you to convert a Binary number to a Decimal number.

## Examples

In this example, we will convert a positive binary number (**101**) to a decimal number (**5**).

Number | Count | Calculation | Simplify |
---|---|---|---|

1 | 2 | 1 × 2^{2} | 4 |

0 | 0 × 2^{1} | 0 | |

1 | 1 × 2^{0} | 1 | |

Total | 5 |

**101** (binary) = **5** (decimal)

**Note**: Count always starts from '0'.

## Examples

In this example, we will convert a negative integer binary number (**-1011**) to a decimal number (**-11**).

Number | Count | Calculation | Simplify |
---|---|---|---|

1 | 3 | 1 × 2^{3} | 8 |

0 | 0 × 2^{2} | 0 | |

1 | 1 × 2^{1} | 2 | |

1 | 1 × 2^{0} | 1 | |

Total | 11 |

**-1011** (binary) = **-11** (decimal)

**Note**: Count always starts from '0'.

**Explanation**: For negative integer binary to decimal number, proceed the steps as same as positive integer binary to decimal number and finally multiply the output by '-1'.

## Examples

In this example, we will convert a fractional binary number (**10.1011**) to a decimal number (2.6875).

Here, we have to split the fractional binary number into two parts.

- Integer part -
**10** - Fraction part -
**0.1011**

Now, convert the **Integer part** of the given binary number (10) into a decimal number.

Number | Count | Calculation | Simplify |
---|---|---|---|

1 | 1 | 1 × 2^{1} | 2 |

0 | 0 × 2^{0} | 0 | |

Total | 2 |

**10** (binary) = **2** (decimal)

**Note**: Count always starts from '0'.

Now, convert the **Fraction part** of the given decimal number (0.1011) into a binary number.

Number | Count | Calculation | Simplify |
---|---|---|---|

1 | 4 | 1 × 2^{-1} | 0.5 |

0 | 0 × 2^{-2} | 0 | |

1 | 1 × 2^{-3} | 0.125 | |

1 | 1 × 2^{-4} | 0.0625 | |

Total | 0.6875 |

**0.1011** (binary) = **0.6875** (decimal)

Now, add both the results

**10.1011** = 2 + 0.6875

**10.1011** (binary) = **2.6875** (decimal)

## Useful links

## Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.