# Binary to Decimal Converter Online Tool

_{10}

_{16}

_{8}

## About Binary to Decimal Converter Online Tool:

This online binary to decimal converter tool helps you to convert one input binary number (base 2) into a decimal number (base 10).

## Binary Numeral System:

Binary numeral system has 2 digits, include `(0, 1)`

. Four binary digits can be represented by 1 hexadecimal digits, and three binary digits can be represented by one octal digits. Binary is the numeral
system that most close to electronic circuit hardware.

## Decimal Numeral System:

Decimal numeral system (also called Hindu-Arabic, or Arabic) has 10 digits, include `(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)`

, it's the most used number system in our daily life. Decimal numeral system is also
one of the most ancient number system, it's inspired by 10 fingers of human.

## How to convert from binary to decimal?

For binary number represents as below (with n digits):

_{n-1}d

_{n-2}...d

_{2}d

_{1}d

_{0}

For each digit in binary numeral system (base 2), equals to each digit multiply by its position power to 2 in decimal numeral system.

_{n-1}Ã 2

^{n-1}+ ... + d

_{1}Ã 2

^{1}+ d

_{0}Ã 2

^{0}

Example 1: Convert binary number "1101" to decimal number:

^{3}+ 1 Ã 2

^{2}+ 0 Ã 2

^{1}+ 1 Ã 2

^{0}= 13

Example 2: Convert binary number "0.101" to decimal number:

^{0}+ 1 Ã 2

^{-1}+ 0 Ã 2

^{-2}+ 1 Ã 2

^{-3}= 0.625

## Binary to Decimal conversion table:

Binary | Decimal | Binary | Decimal |
---|---|---|---|

1 | 1 | 10101 | 21 |

10 | 2 | 10110 | 22 |

11 | 3 | 10111 | 23 |

100 | 4 | 11000 | 24 |

101 | 5 | 11001 | 25 |

110 | 6 | 11010 | 26 |

111 | 7 | 11011 | 27 |

1000 | 8 | 11100 | 28 |

1001 | 9 | 11101 | 29 |

1010 | 10 | 11110 | 30 |

1011 | 11 | 11111 | 31 |

1100 | 12 | 100000 | 32 |

1101 | 13 | 100001 | 33 |

1110 | 14 | 100010 | 34 |

1111 | 15 | 100011 | 35 |

10000 | 16 | 100100 | 36 |

10001 | 17 | 100101 | 37 |

10010 | 18 | 100110 | 38 |

10011 | 19 | 100111 | 39 |

10100 | 20 | 101000 | 40 |

## More information:

Wikipedia (Binary): https://en.wikipedia.org/wiki/Binary_number

Wikipedia (Decimal): https://en.wikipedia.org/wiki/Decimal

## Convert Binary to Decimal with Python:

def binary_to_decimal(binary_str): decimal_number = int(binary_str, 2) return decimal_number binary_input = '1101' decimal_output = binary_to_decimal(binary_input) print('decimal result is:{0}'.format(decimal_output)) ------------------- decimal result is:13

## Convert Binary to Decimal with Java:

public class NumberConvertManager { public static int binary_to_decimal(String binary_str) { return Integer.parseInt(binary_str, 2); } public static void main(String[] args) { String binary_input = "1101"; int decimal_output = binary_to_decimal(binary_input); System.out.println("decimal result is:" + decimal_output); } } ------------------- decimal result is:13