Skip to content
PakCalc

Binary, Decimal, Hex & Octal Converter

Convert whole numbers between base 2 (binary), base 8 (octal), base 10 (decimal) and base 16 (hexadecimal) — all four are shown at once.

Updated

Result

11111111

255 (base 10) = 255 decimal = 11111111 binary = FF hex

Decimal
255
Binary
1111 1111
Octal
377
Hexadecimal
FF

Formula

Decimal → base b: divide by b repeatedly, read remainders bottom-up

Base b → decimal: Σ digit × b^position

Example: 1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11. Hex digits A–F stand for 10–15.

Examples

  • 255 in decimal

    255 (base 10) = 255 decimal = 11111111 binary = FF hex

  • Binary 101101

    101101 (base 2) = 45 decimal = 101101 binary = 2D hex

  • Hex FF

    FF (base 16) = 255 decimal = 11111111 binary = FF hex

Important information

  • Prefixes like 0b (binary), 0o (octal) and 0x (hex) are accepted and ignored. Spaces and underscores between digits are fine too.

Frequently asked questions

How do I convert decimal to binary?

Divide by 2 repeatedly and write the remainders in reverse order. 13 → 1101.

What is hexadecimal used for?

Colour codes (#FF5733), memory addresses and compact representations of binary data — each hex digit equals 4 bits.

Can it convert fractions?

No, whole numbers only.