User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Spaces, dots, and dashes are ignored automatically
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Positional numeral systems encode magnitude through digit placement. A binary string of n bits maps to a decimal value between 0 and 2n โˆ’ 1. Misreading a single bit in a network subnet mask or memory address yields a target off by a power of two. This converter processes arbitrary-length binary input using BigInt arithmetic, so it handles 8-bit bytes, 32-bit IPv4 addresses, 64-bit machine words, and 128-bit UUIDs without precision loss. Standard JavaScript floating-point (53-bit mantissa) silently rounds integers above 9,007,199,254,740,991. This tool does not.

Each conversion displays the positional decomposition so you can verify the arithmetic manually. The tool assumes unsigned (non-negative) binary integers with no fractional part. Two's complement signed interpretation is not applied. If you need signed conversion, invert the bits and add 1 before entering the magnitude.

binary to decimal number converter base 2 to base 10 binary converter numeral system

Formulas

A binary (base-2) integer is converted to decimal (base-10) by summing each bit multiplied by its positional power of 2:

D = nโˆ’1โˆ‘i=0 bi โ‹… 2i

where D = decimal result, bi = the bit value (0 or 1) at position i (counted from the right, starting at 0), and n = total number of bits.

For example, binary 1101:

D = 1 โ‹… 23 + 1 โ‹… 22 + 0 โ‹… 21 + 1 โ‹… 20 = 8 + 4 + 0 + 1 = 13

This tool uses JavaScript BigInt internally, which represents integers of arbitrary precision. The algorithm processes the string left-to-right with Horner's method: start with accumulator D = 0, then for each bit, compute D = D ร— 2 + bi. This avoids exponentiation and runs in O(n) time.

Reference Data

BinaryDecimalHexCommon Use
0000 000110x01Least significant bit
0000 1010100x0ANewline character (LF)
0010 0000320x20ASCII space
0011 0000480x30ASCII digit "0"
0100 0001650x41ASCII letter "A"
0111 11111270x7FMax signed 8-bit (int8)
1000 00001280x80Sign bit in int8
1111 11112550xFFMax unsigned 8-bit (uint8)
0000 0100 0000 00001,0240x4001 Kibibyte (KiB)
0111 1111 1111 111132,7670x7FFFMax signed 16-bit (int16)
1111 1111 1111 111165,5350xFFFFMax unsigned 16-bit (uint16)
1 0000 0000 0000 000065,5360x10000216
0111...1111 (31 ones)2,147,483,6470x7FFFFFFFMax signed 32-bit (int32)
1111...1111 (32 ones)4,294,967,2950xFFFFFFFFMax unsigned 32-bit (uint32) / IPv4 max
11000000.10101000.00000001.000000013,232,235,7770xC0A80101IPv4: 192.168.1.1
11111111.11111111.11111111.000000004,294,967,0400xFFFFFF00Subnet mask /24
0111...1111 (63 ones)9,223,372,036,854,775,8070x7FFFFFFFFFFFFFFFMax signed 64-bit (int64)
1111...1111 (64 ones)18,446,744,073,709,551,6150xFFFFFFFFFFFFFFFFMax unsigned 64-bit (uint64)
1 followed by 10 zeros1,0240x4001 KiB in bytes
1 followed by 20 zeros1,048,5760x1000001 MiB in bytes
1 followed by 30 zeros1,073,741,8240x400000001 GiB in bytes

Frequently Asked Questions

JavaScript's Number type uses IEEE 754 double-precision floats, which only guarantee integer precision up to 253 โˆ’ 1 (9,007,199,254,740,991). This tool uses BigInt arithmetic internally, so it converts binary strings of any length - 64-bit, 128-bit, 256-bit, or longer - with zero precision loss. The result is displayed as a full decimal string.
No. This converter treats all input as unsigned binary. For a two's complement signed number, the most significant bit indicates the sign. To convert a negative two's complement value manually: invert all bits (one's complement), add 1 to get the magnitude, convert that magnitude here, then apply the negative sign.
Yes. The tool automatically strips all characters that are not 0 or 1 before conversion. You can enter grouped formats like 1010 0101 or 11111111.00000000 and it will process them correctly.
There is no hard-coded limit. BigInt can handle thousands of digits. Practically, strings up to several thousand bits convert in under 10 milliseconds in any modern browser. If you paste a string exceeding 10,000 characters, conversion remains correct but display of the step-by-step breakdown is truncated to the first 64 bits for readability.
Binary is a positional number system with base (radix) 2. Each digit's value depends on its position. The breakdown reveals the weight of every bit - 2โฐ = 1, 2ยน = 2, 2ยฒ = 4, and so on - so you can verify the result manually. This is the same process taught in computer science courses for understanding how CPUs represent integers.
Mathematically they produce the same result. The summation formula requires computing 2i for each bit. Horner's method restructures the computation as nested multiplication: ((bโ‚ƒ ร— 2 + bโ‚‚) ร— 2 + bโ‚) ร— 2 + bโ‚€. This avoids exponentiation entirely, uses only multiplication and addition, and is numerically more efficient - especially for very long binary strings.