Skip to content
Calcendium

Search calculators

Calculators

Number Base Converter: Binary, Octal, Decimal and Hex

Convert a whole number between binary, octal, decimal, hexadecimal and any base from 2 to 36.

  • Calculated in your browser — inputs are never sent to Calcendium
  • All results are estimates
  • Last reviewed

Calculator

Number

Whole numbers only, up to 64 digits. Digits above 9 are the letters A to Z.

Results

In Binary (base 2)

Estimate

1111 1111

255 in Decimal (base 10).

In common bases

Binary (base 2)
1111 1111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF
On this page

How number bases work

In a positional system each digit is worth the digit times a power of the base, counted from 0 on the right. Decimal uses base 10; the binary system uses base 2 with only 0 and 1. Bases above 10 borrow letters: in hexadecimal A = 10 up to F = 15, and in base 36 the letters run to Z = 35.

Value of a number in base b
value = dₙ·bⁿ + … + d₂·b² + d₁·b¹ + d₀·b⁰
dₖ
The digit in position k, from 0 on the right
b
The base, 2 to 36

To write a number in another base, the calculator divides it by the new base again and again; the remainders, read from last to first, are the digits. All arithmetic uses exact integers, so long binary and hexadecimal numbers stay exact.

Worked example

Binary 1011 to decimal
1 × 2^38
0 × 2^20
1 × 2^12
1 × 2^01
Decimal11

Going the other way, 255 is 11111111 in binary, 377 in octal and FF in hexadecimal. Hexadecimal 2F is 2 × 16 + 15 = 47.

How to read your results

  • Grouping: long binary and hexadecimal results are shown in groups of four digits for readability; the spaces are not part of the number.
  • Hexadecimal and binary: one hex digit is exactly four binary digits, which is why colors (#FF8800) and memory addresses use hex.
  • Place values show how the input adds up to its decimal value.

For Roman numerals, see the Roman numeral converter.

Assumptions

  • Whole numbers, positive or negative, with up to 64 digits.
  • Letters can be upper or lower case; spaces and underscores are ignored.
  • The prefixes 0b, 0o and 0x are accepted for bases 2, 8 and 16.

Limitations

  • Fractions such as 0.1 in binary are not converted.
  • Negative numbers are shown with a minus sign, not as two's complement, which depends on a fixed number of bits.
  • Bases above 36 would need more symbols than digits and letters provide.

Frequently asked questions

How do I convert decimal to binary?

Divide by 2 repeatedly and write the remainders from last to first. 11 ÷ 2 = 5 r 1, 5 ÷ 2 = 2 r 1, 2 ÷ 2 = 1 r 0, 1 ÷ 2 = 0 r 1, so 11 is 1011.

What is 255 in binary and hex?

255 is 11111111 in binary and FF in hexadecimal: the largest value of one byte.

Why do computers use binary and hexadecimal?

Digital circuits store two states, which map to 0 and 1. Hexadecimal is a compact way to write binary, because each hex digit stands for exactly four bits.

Sources

Definitions and rules referenced on this page. Calcendium is not affiliated with these publishers.

  1. Binary number system

    Encyclopaedia Britannica · International · Checked October 29, 2026

    A positional numeral system with base 2 and the digits 0 and 1; each position is worth a power of the base.