The formula
value = Σ digit × baseᵖᵒˢⁱᵗⁱᵒⁿ
A number base says how many different digits are used before carrying to the next place. Decimal uses ten, binary two, and hexadecimal sixteen (0 to 9, then A to F). Computers store everything in binary. Hexadecimal is a compact way to write it, since each hex digit stands for exactly four binary digits.
How to use this calculator
- Enter number.
- Choose it is written in.
- Enter also show base.
- Read the answer on the right. It updates as you type, and the numbered steps underneath show how it was worked out.
Worked example
Using Number: 255; It is written in: Decimal (base 10); Also show base: 36.
- Divide by 2 repeatedly and read the remainders from bottom to top.
- 255 in binary has 8 digits.
Binary: 11111111
Common questions
How do I convert decimal to binary?
Divide the number by 2 repeatedly, writing down each remainder. Read the remainders from last to first.
Why is hexadecimal used in computing?
One hex digit represents exactly four bits, so a byte is always two hex digits. That makes binary data far easier to read.