Number Base Converter (Binary, Octal, Decimal, Hex)
Type a number in any base to see it in binary, octal, decimal and hexadecimal.
Your numbers
Your results
Number Base Converter (Binary, Octal, Decimal, Hex) by TheCalcTools
How the Number Base Converter (Binary, Octal, Decimal, Hex) works
Each digit’s value is multiplied by the base raised to its position. Binary (base 2) uses 0 and 1; hexadecimal (base 16) uses 0-9 and A-F, so one hex digit is exactly four bits.
Spaces and underscores are ignored, so you can paste grouped values like 1111 0000. Letters are case-insensitive.
The formula
Worked example
Using the default values shown in the calculator:
| Number | 255 |
|---|---|
| Its base | Decimal (10) |
| Also show in base (2-36) | 3 |
- 255 in binary is 11111111 and in hexadecimal FF.
- It needs 8 bits.
Result:
| Decimal | 255 |
|---|---|
| Binary | 11111111 |
| Octal | 377 |
| Hexadecimal | FF |
| In your extra base | 100110 |
| Bits needed | 8 |
| Number of 1 bits | 8 |
Frequently asked questions
Why do programmers use hexadecimal?
Two hex digits describe one byte exactly, so memory addresses and colours (#FF8800) are compact and easy to map to bits.
Sources and further reading
Related calculators
More in AI & Computing · All calculators
This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.
