Binary, Decimal and Hex Converter
Convert a whole number between binary, octal, decimal and hexadecimal.
How it works
Each digit is worth the digit times the base raised to its position. Decimal 255 is 11111111 in binary and FF in hexadecimal, where A to F stand for 10 to 15.
Example
Value: 255 · Written in: Decimal (base 10) → Binary (base 2): 11111111
Formula
value = Σ digit × base^position
Source
Standard mathematical definitions (Roman numeral notation, positional number systems, the Euclidean algorithm).
Checked: 2026-11-19 · Results are for information only.
Common examples
| Value | Binary (base 2) |
|---|---|
| 2 | 10 |
| 8 | 1000 |
| 10 | 1010 |
| 16 | 10000 |
| 100 | 1100100 |
| 255 | 11111111 |
| 1024 | 10000000000 |
Select a row to load it into the calculator.
Good to know
- One hexadecimal digit stands for exactly four bits, so a byte is always two hex digits: FF is 255.
- Web colors use this. In #FF8000 the three pairs are red 255, green 128 and blue 0.
Questions and answers
What do A to F mean in hexadecimal?
They are the digits for 10 to 15, so F is 15 and FF is 255.
How large a number can I convert?
Whole numbers up to 9,007,199,254,740,991, the largest value a browser handles exactly.