Math · free · step by step
Binary Converter
Type in any box to convert between binary, decimal, hex, octal and any base from 2 to 36. Big numbers and fractions convert exactly, with the steps, two’s complement and how a float is stored.
Step by step
Two’s complement bits
Click a bit to flip it.
IEEE 754 floating point
Chart
Decimal, binary, octal and hex from 0 to 16
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
Worked examples
Conversion examples
| Convert | Answer |
|---|---|
| 15610 to binary | 100111002 |
| 101101102 to decimal | 18210 |
| FF16 to decimal | 25510 |
| 2F16 to binary | 1011112 |
| 100010 to hex | 3E816 |
| 7558 to binary | 1111011012 |
| 10.62510 to binary | 1010.1012 |
| 0.110 to binary | 0.0(0011)2 |
| 25510 to base 36 | 7336 |
More math
Other math tools
- Scientific CalculatorTrig, logs, powers, n!, nCr with history and exact answers
- Fraction CalculatorAdd, subtract, multiply and divide fractions with steps
- Matrix CalculatorDeterminant, inverse, multiply and RREF with steps
- Statistics CalculatorMean, median, mode, standard deviation and regression
- Complex Number Calculatora + bi, polar form, powers and roots with steps
- Equation SolverQuadratic, cubic and simultaneous equations with steps
- Graphing CalculatorPlot functions, circles, polar and parametric curves
- Derivative CalculatorDerivatives with every step shown
- Integral CalculatorIntegrals with steps, definite and indefinite
- Ohm’s Law CalculatorVolts, amps, ohms and watts
Questions
Binary Converter FAQ
Free, private and works offline: everything is worked out in your browser.
How do you convert decimal to binary?
Divide by 2 again and again and write down the remainders, then read them from the bottom up. 156 ÷ 2 = 78 r 0, 78 ÷ 2 = 39 r 0, and so on until you reach 0; reading the 8 remainders upward gives 10011100.
How do you convert binary to decimal?
Multiply each bit by its place value (1, 2, 4, 8, 16… from the right) and add: 10110110 = 128 + 32 + 16 + 4 + 2 = 182.
How do you convert hex to binary and back?
Each hex digit is exactly four bits, so swap digit for group: 2F = 0010 1111, and 1011 0110 = B6. Octal works the same way with groups of three bits.
How do I convert hex to decimal?
Multiply each digit by a power of 16 (A = 10 … F = 15) and add: FF = 15 × 16 + 15 = 255, and 7E3 = 2019.
What is two’s complement?
It is how computers store negative whole numbers. Write the positive value in binary, flip every bit, then add 1: in 8 bits, 5 is 00000101, flipped is 11111010, and adding 1 gives 11111011 (hex FB) for −5. Click any bit in the converter to flip it and see the number change.
How are decimals like 0.1 stored in binary?
0.1 has no exact binary form: it is 0.00011… with 0011 repeating. A 32-bit float stores the nearest value, 0.100000001490116119384765625, as hex 3DCCCCCD; that small error is why 0.1 + 0.2 isn’t exactly 0.3 in most programming languages.
Can it convert very large numbers and other bases?
Yes. Whole numbers of any length convert exactly, and the “Other base” field works with any base from 2 to 36 (digits 0–9 then A–Z). Fractions convert too, with repeating digits shown in brackets.
Is the binary converter free and private?
Yes. Everything runs in your browser and nothing you type is sent anywhere. The link updates as you type so you can share a conversion.