Calculyn

Binary Converter

Convert numbers between decimal, binary, octal and hexadecimal.

Results update as you type.

Decimal value

255

0b11111111

Binary
255(0b11111111)
Octal
377(0o377)
Hexadecimal
255(0xFF)
Decimal value255

Was this calculator helpful?

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.