Number Base Converter
Convert whole numbers between binary, octal, decimal and hexadecimal.
Results
Decimal
255
Binary
11111111
Octal
377
Hexadecimal
FF
What this tool does
Pick the base your number is written in and read it back in the other three. Hexadecimal is the compact way to write binary — each hex digit is exactly four bits — which is why colours, memory addresses and error codes use it.
Formula
binary (2) · octal (8) · decimal (10) · hexadecimal (16)
Variables
| Symbol | Meaning | Unit |
|---|---|---|
input_number | Number to convert | — |
from_base | From | — |
decimal | Decimal | — |
binary | Binary | — |
octal | Octal | — |
hexadecimal | Hexadecimal | — |
Worked example
- Number to convert255
- From10
- Decimal255
- Binary11111111
- Octal377
- HexadecimalFF