Free binary converter. Convert between binary, octal, decimal and hexadecimal instantly — pick the input base and get all four representations at once.
Your results will appear here.
Enter your values and press Calculate.
Each digit of a number carries a weight of base raised to its position: binary 1010 is 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 10 in decimal. The converter validates your digits against the chosen base, decodes the value to decimal, then re-encodes it in binary, octal, decimal and hexadecimal at once.
To convert binary to decimal online, enter the value above and pick the input base. Here are more conversion examples worked by hand:
Binary uses positional notation just like decimal, except each position is a power of two. The binary to decimal formula: multiply each digit by 2^position (counting from 0 at the right) and add them up.
Step-by-step conversion of 1010: 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 8 + 0 + 2 + 0 = 10. So 1010 in decimal is 10. Another example: what is 11111111 in decimal? Eight ones give 128+64+32+16+8+4+2+1 = 255. What is 1111 binary in decimal? 8+4+2+1 = 15. What is binary 10000000 in decimal? Just the leftmost bit: 128. This binary to decimal conversion method works for any length — common mistakes come from misreading the positions, so write the place values (128, 64, 32, 16, 8, 4, 2, 1) above the digits.
| Power | 2⁷ | 2⁶ | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ | |---|---|---|---|---|---|---|---|---| | Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Memorize this powers of two chart and every 8-bit binary to decimal conversion becomes a quick addition. Four bits make a nibble, eight bits make a byte — yes, an 8-bit binary number is exactly one byte — and sixteen bits make a word. The binary place value chart scales up: 2⁸ = 256, 2¹⁰ = 1024, 2¹⁶ = 65536, 2³² = 4294967296.
Compact binary to decimal conversion table (3-bit):
| Binary | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 | |---|---|---|---|---|---|---|---|---| | Decimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
How do you convert decimal to binary? Divide by 2 repeatedly and read the remainders bottom-up. Converting 10: 10÷2 = 5 r0, 5÷2 = 2 r1, 2÷2 = 1 r0, 1÷2 = 0 r1 — reading remainders upward gives 1010. Converting 255 gives 11111111, and converting 419 gives 110100011. To convert decimal to hexadecimal, do the same with divisor 16 and read remainders as hex digits (10–15 become A–F).
Hexadecimal is shorthand for binary: every 4 bits map to one hex digit (1010 ↔ A, 1111 ↔ F), which is why programmers prefer it — compare writing 0xFF with 11111111. How do I convert binary to hex quickly? Group the bits in fours from the right and convert each group. How do you convert binary to octal? Group in threes instead. To convert binary to hexadecimal or octal, you never need decimal as a middleman.
What does the 0x prefix mean? It marks a number as hexadecimal — 0x1A3 equals 419 in decimal (the UK term for decimal is denary (in the UK, decimal is sometimes called denary), hence "binary to denary calculator"). What is the difference between binary and decimal number systems? Binary has 2 digits per position, decimal has 10; both are positional. What is the difference between binary and hexadecimal? Hex is base 16, so it's four times more compact than binary but converts losslessly in both directions.
Can a binary number be negative? In unsigned binary, no — all bits count toward magnitude. In signed binary, the leftmost bit is the sign bit, and negative values use two's complement: invert all bits and add 1. So in 8-bit signed binary, 00000101 is +5 and 11111011 is −5.
This is why the same binary pattern sometimes has different decimal values — 11111111 is 255 unsigned but −1 signed. What is the largest unsigned 16-bit decimal value? 2¹⁶ − 1 = 65535. What is a signed 32-bit integer? A 32-bit two's complement value from −2,147,483,648 to 2,147,483,647 — the classic int range. Can leading zeros change a binary number? No — 00001010 equals 1010; they're only padding.
How do I convert a binary fraction to decimal? Extend the place values right of the point as 2^−1, 2^−2, …: 0.101 in binary is 0.5 + 0 + 0.125 = 0.625. Binary fractions terminate only when the denominator is a power of two — hence floating-point rounding quirks.
Why is binary used in computers? Because a transistor is naturally on or off — two states map perfectly to 1 and 0, making hardware simple and noise-resistant. What is ASCII and how does it relate to binary? ASCII assigns each character a 7-bit binary code: 'A' is 65, or 1000001 in binary. What are bitwise operations? AND, OR, XOR and shifts manipulate individual bits — the fastest operations a CPU has, used in flags, masks and cryptography.
A binary converter translates numbers between binary (base 2) and other bases — decimal, octal and hexadecimal — using positional place values. This one converts any input base and shows all four representations at once.
Multiply each bit by its power of two (from the right, starting at 2⁰⁾ and add: 1010 = 1×8 + 0×4 + 1×2 + 0×1 = 10.
Divide by 2 repeatedly and read the remainders from bottom to top. For 10: remainders 0, 1, 0, 1 read upward give 1010.
decimal = Σ (bit × 2^position), with positions counted 0, 1, 2, … from the rightmost digit.
255 — eight ones sum to 128+64+32+16+8+4+2+1.
10 — that's 8 + 2.
Group the bits in fours from the right; each group of four is one hex digit. 1111 1010 becomes FA.
In signed binary, yes — the leftmost bit is the sign, and negative values use two's complement (invert all bits, add 1). In unsigned binary every bit adds magnitude, so values are always ≥ 0.
Bits after the point are worth 2^−1 (0.5), 2^−2 (0.25), 2^−3 (0.125) and so on: binary 0.101 = 0.625.
Yes — a byte is 8 bits by definition. Four bits are a nibble, sixteen bits a word.
65,535 — that's 2¹⁶ − 1.
No. 00001010 and 1010 are both 10; leading zeros are just padding for fixed widths.
Yes for typical widths, but note JavaScript integers are exact only up to 2⁵³ (about 9 quadrillion); beyond that it uses arbitrary-precision parsing and reports the exact integer string.
It marks a literal as hexadecimal: 0xFF means the hex number FF, which is 255 in decimal.
A 32-bit two's-complement integer ranging from −2,147,483,648 to 2,147,483,647 — the standard int type in many languages.
Hardware has two natural states — on and off — so binary maps directly onto transistors, making circuits simple, fast and resistant to electrical noise.
Because the same bits have different meanings in signed and unsigned contexts: 11111111 is 255 as an unsigned byte but −1 as a signed two's-complement byte. The width and the signedness decide the value.