ToolsVortex
Explore tools
Binary to Decimal Converter on ToolsVortex with a worked example filled in

Binary to Decimal Converter

ToolsVortex · Math & School

Type a binary number to get its decimal value, or switch to decimal, hex or octal input to convert the other way. Every result shows all four bases, the bit length and the place value working.

Convert from
Result
45
Binary 10 1101 = 45 in decimal
45Decimal
10 1101Binary
2DHex
55Octal
6 bitsBit length
Working

Runs in your browser. Nothing you type is sent anywhere.

Binary to Decimal Converter on ToolsVortex with a worked example filled in
Binary to Decimal Converter: binary 101101 shown as 45, with hex 2D, octal 55 and the powers of 2.

This binary to decimal converter is for computer science students, programmers and electronics hobbyists. It converts between binary, decimal, hexadecimal and octal in any direction, uses exact big integer maths (JavaScript BigInt, which stores whole numbers of any size) so a 64 bit or 1,000 digit value never loses precision, and writes out the powers of 2 so you can learn the method, not just copy the answer.

How Do You Convert Binary to Decimal?

To convert binary to decimal, multiply each bit by its power of 2 and add the results, starting with 2⁰ on the right. For 101101, the 1 bits sit at 2⁵, 2³, 2² and 2⁰, so the value is 32 + 8 + 4 + 1 = 45. Zeros add nothing.

What Is the Binary Number System?

The binary number system is base 2: it uses only the digits 0 and 1, and each place is worth twice the place to its right. Our everyday decimal system is base 10, where each place is worth ten times more. A single binary digit is a bit, and 8 bits make a byte, which can hold 2⁸ = 256 values, from 0 to 255. Computers use binary because a circuit can easily be in one of two states, off or on.

value = dₙ × 2ⁿ + … + d₂ × 2² + d₁ × 2¹ + d₀ × 2⁰

This is positional notation: the same digit means a different amount depending on where it sits. In binary the place values from the right are 1, 2, 4, 8, 16, 32, 64, 128 and so on.

How Do You Convert Decimal to Binary?

To convert decimal to binary, divide the number by 2 again and again, write down each remainder, then read the remainders from bottom to top. For 156: 156 ÷ 2 = 78 r 0, 78 ÷ 2 = 39 r 0, 39 ÷ 2 = 19 r 1, 19 ÷ 2 = 9 r 1, 9 ÷ 2 = 4 r 1, 4 ÷ 2 = 2 r 0, 2 ÷ 2 = 1 r 0, 1 ÷ 2 = 0 r 1. Reading up gives 10011100. Pick Decimal in the tool and it lists these steps for any number up to 64 bits. The same remainder idea is the basis of the GCF calculator, which uses repeated division too.

How Are Hex and Octal Related to Binary?

Hexadecimal (base 16) packs every 4 bits into one digit from 0 to F, and octal (base 8) packs every 3 bits into one digit from 0 to 7. That is why programmers use hex as shorthand: the byte 1111 1111 is just FF, and 1001 1100 is 9C. Hex colour codes and memory addresses are written this way, while Unix file permissions such as 755 use octal. The tool groups binary in blocks of 4 so you can read the hex digits straight off. The same timestamps you see in Unix time are stored as binary integers inside the computer.

DecimalBinaryHexOctal
0000
1111
21022
510155
81000810
101010A12
151111F17
161 00001020
4210 10102A52
100110 010064144
2551111 1111FF377
2561 0000 0000100400
1,024100 0000 00004002000
65,5351111 1111 1111 1111FFFF177777

Worked Example

A student is given the binary number 101101 in class. Enter it with Binary selected: the working shows 2⁵ + 2³ + 2² + 2⁰ = 32 + 8 + 4 + 1, so the answer is 45, which is 2D in hex and 55 in octal, using 6 bits. Now pick Decimal and type 156: the tool divides by 2 eight times and returns 1001 1100, hex 9C. For a long value, paste 1 followed by 64 zeros in binary and you get exactly 18,446,744,073,709,551,616, which is 2⁶⁴. If you need powers of 2 like that in general, the scientific notation converter helps write them compactly.

How Do You Use the Binary to Decimal Converter?

  1. Choose the input base

    Tap Binary, Decimal, Hex or Octal to set the kind of number you will type.

  2. Type the number

    Enter the digits. Spaces and a 0b or 0x prefix are ignored.

  3. Read the result

    Binary input shows the decimal value; other inputs show the binary value.

  4. Check every base

    The boxes show decimal, binary, hex, octal and bit length, with the working below.

How to use the Binary to Decimal Converter, steps 1 to 4 numbered on the tool
The numbers on the picture match the steps above.

Frequently Asked Questions

What is 11111111 in decimal?

11111111 in binary is 255 in decimal. It is eight 1 bits, so the value is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255, the largest number one byte can hold. In hex it is FF.

What is 10 in binary?

The decimal number 10 is 1010 in binary. Divide by 2: 10 gives 5 r 0, 5 gives 2 r 1, 2 gives 1 r 0, 1 gives 0 r 1. Reading the remainders upward gives 1010, which is A in hex.

How many bits do I need for a number?

A number n above 0 needs the bits in its binary form, which is the whole part of log₂ n plus 1. So 255 needs 8 bits and 256 needs 9. The tool shows this as the bit length.

How long a binary number can I convert?

Up to 1,100 digits in any base. The tool uses JavaScript BigInt, so the answer is exact with no rounding. Normal numbers lose precision above 2⁵³, about 9 × 10¹⁵, but BigInt does not.

Why do programmers write 0x and 0b before numbers?

The prefix tells the reader and the compiler which base is used: 0b for binary, 0x for hex and often 0o for octal. So 0x10 is 16, not ten. You can paste numbers with these prefixes into the tool.

Does this converter handle negative or fractional binary?

No. It converts whole numbers from 0 upward. Negative values in computers usually use two's complement, which depends on a fixed bit width such as 8 or 32, so convert the positive value first and apply the sign rule your system uses.

Sources and Further Reading

Related Tools

Last reviewed: October 2026