Converters & Notation

Number Base Converter

Type a value, choose the base it is in and the base you want. The working shows the place-value expansion and the repeated-division steps.

Try an example:
AnswerFF
  • 255 (base 10) = FF (base 16)
  • Decimal: 255
Step-by-step working 2 steps
  1. 1
    Already decimal
    255
  2. 2
    Convert decimal to base 16 by repeated division
    255 ÷ 16 = 15 remainder 15 (F)
    15 ÷ 16 = 0 remainder 15 (F)

    Read the remainders from bottom to top.

How to use the number base converter

  1. Type the value.
  2. Choose its current base and the target base.
  3. Read the converted value.
  4. Open the steps for the expansion and division.

Methods

To decimal: Σ digit × baseᵖᵒˢⁱᵗⁱᵒⁿ
From decimal: divide repeatedly by the target base
Read the remainders from bottom to top

Digits above 9 use letters: A = 10, B = 11, … Z = 35.

Worked examples

Each example below is generated by the same calculator you used above, so the working always matches the answer.

255 → hex
AnswerFF
  • 255 (base 10) = FF (base 16)
  • Decimal: 255
Step-by-step working 2 steps
  1. 1
    Already decimal
    255
  2. 2
    Convert decimal to base 16 by repeated division
    255 ÷ 16 = 15 remainder 15 (F)
    15 ÷ 16 = 0 remainder 15 (F)

    Read the remainders from bottom to top.

1010 binary → decimal
Answer10
  • 1010 (base 2) = 10 (base 10)
  • Decimal: 10
Step-by-step working 1 steps
  1. 1
    Convert from base 2 to decimal
    1 × 2^3 = 8
    0 × 2^2 = 0
    1 × 2^1 = 2
    0 × 2^0 = 0
    Sum = 10

    Each digit is multiplied by its place value, a power of the base.

FF hex → binary
Answer11111111
  • FF (base 16) = 11111111 (base 2)
  • Decimal: 255
Step-by-step working 2 steps
  1. 1
    Convert from base 16 to decimal
    F × 16^1 = 240
    F × 16^0 = 15
    Sum = 255

    Each digit is multiplied by its place value, a power of the base.

  2. 2
    Convert decimal to base 2 by repeated division
    255 ÷ 2 = 127 remainder 1
    127 ÷ 2 = 63 remainder 1
    63 ÷ 2 = 31 remainder 1
    31 ÷ 2 = 15 remainder 1
    15 ÷ 2 = 7 remainder 1
    7 ÷ 2 = 3 remainder 1
    3 ÷ 2 = 1 remainder 1
    1 ÷ 2 = 0 remainder 1

    Read the remainders from bottom to top.

777 octal → decimal
Answer511
  • 777 (base 8) = 511 (base 10)
  • Decimal: 511
Step-by-step working 1 steps
  1. 1
    Convert from base 8 to decimal
    7 × 8^2 = 448
    7 × 8^1 = 56
    7 × 8^0 = 7
    Sum = 511

    Each digit is multiplied by its place value, a power of the base.

Common mistakes to avoid

Using a digit that is too big

Binary only allows 0 and 1; octal 0 to 7.

Reading remainders in the wrong order

The last remainder is the leading digit.

Forgetting place values grow by powers

In binary the places are 1, 2, 4, 8, 16, …

Frequently asked questions

Why do computers use binary and hex?

Hardware stores two states; hexadecimal is a compact way to read groups of four bits.

Does it handle fractions?

Not yet: it converts whole numbers up to 40 digits.