Binary, hex and decimal converter
A binary number is a sum of powers of two: 1011 0110 = 128 + 32 + 16 + 4 + 2 = 182. Each group of 4 bits is one hex digit (1011 = B, 0110 = 6), so 182 is B6 in hexadecimal.
Your values
Enter a whole number in the chosen base (binary 0-1, decimal 0-9, hex 0-9 and A-F), at most 32 bits.
These values have no real result.
Result
- BIN binary
- DEC decimal
- HEX hexadecimal
Fix the value marked above to see the result.
Worked steps
- 1011 0110₂ = 128 + 32 + 16 + 4 + 2 = 182
- 1011 0110₂ → 1011 = B, 0110 = 6 → B6₁₆
Formulas used
The same formulas as the formula sheet and the practice questions; the worked steps print them with your numbers.
x = Σ dᵢ × bⁱ1 hex digit = 4 bits
Questions
How do you convert binary to decimal?
Add the place values of the 1 bits. Reading from the right, the places are 1, 2, 4, 8, 16 and so on: 1011 is 8 + 2 + 1 = 11.
How do you convert binary to hex?
Split the bits into groups of four from the right and write each group as one hex digit from 0 to F: 1111 0010 is F2.
How big a number can I convert?
Whole numbers from 0 to 4,294,967,295, the largest 32-bit value (FFFFFFFF in hex). Spaces and a 0x or 0b prefix are ignored.