Binary Number to Decimal Number Converter
Convert binary numbers to decimal instantly. Supports unlimited digits with BigInt, step-by-step breakdown, conversion history, and common presets.
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.
Formulas
A binary (base-2) integer is converted to decimal (base-10) by summing each bit multiplied by its positional power of 2:
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:
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
| Binary | Decimal | Hex | Common Use |
|---|---|---|---|
| 0000 0001 | 1 | 0x01 | Least significant bit |
| 0000 1010 | 10 | 0x0A | Newline character (LF) |
| 0010 0000 | 32 | 0x20 | ASCII space |
| 0011 0000 | 48 | 0x30 | ASCII digit "0" |
| 0100 0001 | 65 | 0x41 | ASCII letter "A" |
| 0111 1111 | 127 | 0x7F | Max signed 8-bit (int8) |
| 1000 0000 | 128 | 0x80 | Sign bit in int8 |
| 1111 1111 | 255 | 0xFF | Max unsigned 8-bit (uint8) |
| 0000 0100 0000 0000 | 1,024 | 0x400 | 1 Kibibyte (KiB) |
| 0111 1111 1111 1111 | 32,767 | 0x7FFF | Max signed 16-bit (int16) |
| 1111 1111 1111 1111 | 65,535 | 0xFFFF | Max unsigned 16-bit (uint16) |
| 1 0000 0000 0000 0000 | 65,536 | 0x10000 | 216 |
| 0111...1111 (31 ones) | 2,147,483,647 | 0x7FFFFFFF | Max signed 32-bit (int32) |
| 1111...1111 (32 ones) | 4,294,967,295 | 0xFFFFFFFF | Max unsigned 32-bit (uint32) / IPv4 max |
| 11000000.10101000.00000001.00000001 | 3,232,235,777 | 0xC0A80101 | IPv4: 192.168.1.1 |
| 11111111.11111111.11111111.00000000 | 4,294,967,040 | 0xFFFFFF00 | Subnet mask /24 |
| 0111...1111 (63 ones) | 9,223,372,036,854,775,807 | 0x7FFFFFFFFFFFFFFF | Max signed 64-bit (int64) |
| 1111...1111 (64 ones) | 18,446,744,073,709,551,615 | 0xFFFFFFFFFFFFFFFF | Max unsigned 64-bit (uint64) |
| 1 followed by 10 zeros | 1,024 | 0x400 | 1 KiB in bytes |
| 1 followed by 20 zeros | 1,048,576 | 0x100000 | 1 MiB in bytes |
| 1 followed by 30 zeros | 1,073,741,824 | 0x40000000 | 1 GiB in bytes |