Number, From base, To base
Waiting for input
How this calculator works
The base, or radix, is how many distinct digits a number system uses. Decimal uses ten; binary uses two and is how computers store everything; hexadecimal uses sixteen, with the letters A to F for ten to fifteen, and is a compact way to write binary because each hex digit stands for exactly four bits.
Formula
- Value = Σ digit × base^position, counting positions from 0 on the right
- To convert to a base, divide repeatedly by it and read the remainders in reverse
- Digits above 9 use letters: A = 10, B = 11, … Z = 35
Worked example
255 from decimal to hexadecimal
- Number
- 255
- From base
- 10
- To base
- 16
ResultFF
255 in base 10 is FF in base 16.
Frequently asked questions
How do I convert binary to decimal?
Multiply each bit by the power of two for its position and add. 1011 is 8 + 0 + 2 + 1 = 11.
Why is hexadecimal used in computing?
One hex digit represents four bits, so a byte is always two hex digits. That makes long binary values much easier to read.
What does 0x mean?
It is a prefix marking a hexadecimal number in many programming languages. 0xFF is 255. Enter the digits without the prefix here.
Sources
More in Math
Results are estimates based on the values you enter and the published method shown above. They do not replace professional medical, financial or legal advice. Method reviewed October 7, 2026. About this site