Learning and homework
Check answers for computer science and electronics classes, and see the place-value working that gets there.
Convert binary (base 2) to decimal (base 10) instantly with this free online binary to decimal converter. Enter a number made only of 0s and 1s to see its decimal value, hexadecimal, octal and step-by-step place-value calculation. You can also convert decimal to binary, work with fractions and signed two’s-complement values, and copy results. Conversions run in your browser.
Tap a base to copy it. Hex and octal are exact, including digits after the point.
Enter a number to see the working.
Understand how binary works, convert by hand, and read signed numbers with confidence.
Binary is the number system computers use. It has only two digits, 0 and 1, called bits. Decimal is the system people use every day, with ten digits. Converting between them lets you read what a computer is storing, or write a value the way a computer wants it.
Each position in a binary number is worth twice the position to its right: 1, 2, 4, 8, 16 and so on. Add up the positions that hold a 1 and you have the decimal value. This converter does that instantly, shows the working, and also gives hexadecimal and octal. For a visual use of hex values, try the Color Palette Generator.
Check answers for computer science and electronics classes, and see the place-value working that gets there.
Read bit flags, masks, permissions and register values, or check what a signed 8-bit or 32-bit value really is.
Work with IP address octets, subnet masks and raw bytes, or decode a string of bytes into readable text.
These examples show the method. You can type any of them into the converter to check.
| Binary | Working | Decimal | Hex |
|---|---|---|---|
| 1101 | 8 + 4 + 1 | 13 | D |
| 11010110 | 128 + 64 + 16 + 4 + 2 | 214 | D6 |
| 101.101 | 4 + 1 + 0.5 + 0.125 | 5.625 | 5.A |
| 11111111 (8-bit signed) | 255 − 256 | −1 | FF |
| 10000000 (8-bit signed) | 128 − 256 | −128 | 80 |
Spreadsheets and programming languages have built-in functions for this. They are limited to smaller numbers than this tool.
Excel’s BIN2DEC accepts at most 10 bits and treats the tenth bit as a sign bit, so use this tool for longer values.
All the bits are part of the value. In 8 bits you can store 0 to 255.
The first bit counts as a negative amount. In 8 bits you can store −128 to 127. To negate a number, flip every bit and add 1.
The same bits mean different numbers at different widths. 11111111 is −1 as 8 bits but 255 as unsigned, and 0000000011111111 is 255 even as 16 bits signed.
Writing a minus sign in front, like −1010, is a different idea from two’s complement. This tool shows both when you convert a negative decimal number.
Every conversion runs in your browser. The numbers you type are never sent to our server and are not saved.
Binary input is limited to 2,048 bits and decimal input to about 600 digits. Decimal fractions that do not end in binary are cut at 32 binary digits. Floating-point formats such as IEEE 754 are not interpreted: bits are read as plain numbers.
Write the place values 1, 2, 4, 8, 16 and so on under the bits, starting from the right. Add up the place values wherever the bit is 1. For 1101 that is 8 + 4 + 1 = 13.
Divide the number by 2 repeatedly and note each remainder. When you reach 0, read the remainders from last to first. For 13 the remainders give 1101.
Yes. Digits after the binary point count as 1/2, 1/4, 1/8 and so on, so 101.101 is 5.625. Going the other way, decimal fractions are converted up to 32 binary digits, and the tool tells you when a value cannot be written exactly.
Two’s complement is how computers store negative whole numbers. The first bit has a negative weight, so in 8 bits 11111111 is −1 and 10000000 is −128. Tick the signed option and pick a bit width to read your bits this way.
Up to 2,048 bits, or about 600 decimal digits. The conversion uses exact arbitrary-precision arithmetic, so large numbers do not lose digits the way they would in a normal calculator.
Binary numbers use only 0 and 1. If your number contains digits such as 2 to 9 it is probably decimal, so switch to Decimal → Binary. Spaces, underscores and a leading 0b are ignored.
Yes. Every conversion also shows hexadecimal (base 16) and octal (base 8), and you can tap any value to copy it.
When you enter a whole number of bytes (a multiple of 8 bits), the tool also shows the text those bytes spell in UTF-8, for example 01001000 01101001 is Hi.
No. All conversion happens in your browser and nothing you type is sent to our server or saved.
Yes. Add ?mode=b2d&value=11010110 or ?mode=d2b&value=214 to the page address.
The homepage features dozens more free tools that don't require an API key.
Convert text to uppercase, camelCase, title case, snake_case and more.
Open toolCount words, characters, sentences and reading time as you type.
Open toolCompare two texts line by line to see what has changed.
Open toolRemove repeated lines from any list or block of text.
Open toolNo matching question.
Share your thoughts on this tool with other visitors.