Decimal 255
Input
- Number: 255
- Base: 10
Calculation
255 = 0xFF = 11111111₂ = 377₈
Result
Hex FF, binary 11111111, octal 377.
Type an integer in one base and read the same value in decimal, hex, binary, and octal.
Overview
Hex packs 4 bits into one digit. Octal packs 3 bits. Binary shows every bit. Decimal is the everyday form.
Choose the base you are typing in. The other three update as you type. Spaces, underscores, and the prefixes 0x, 0b, and 0o are ignored when they match the selected base.
This converts integers only. Fractions and floating hex are not included.
Steps
Decimal, hex, binary, or octal.
Digits must fit that base. Hex may use A–F.
Decimal, hex, binary, and octal stay in sync.
The sign is kept in every base.
Binary is spaced every 4 bits and hex every 4 digits for reading. The value is unchanged.
Math
Value is parsed in the selected base and printed with toString(10), toString(16), toString(2), and toString(8).
Each base is a way to write the same integer. Conversion does not change the quantity.
Worked cases
255 = 0xFF = 11111111₂ = 377₈
Hex FF, binary 11111111, octal 377.
15×16 + 15 = 255
Decimal 255.
8 + 2 = 10
Decimal 10, hex A, octal 12.
Why use this
Questions