Quick answer
255 in decimal is 11111111 in binary, 377 in octal, and FF in hexadecimal.
How it works
Every number can be written in any base. Binary uses digits 0–1, octal 0–7, decimal 0–9, and hexadecimal 0–9 plus A–F. The same value, four ways to write it.
Formula
Value = Σ digit × base^position
Assumptions & limitations
- Results are rounded for display.
Frequently asked questions
Why do programmers use hex?
One hex digit maps exactly to four binary bits, so it's a compact way to read and write binary values.