Skip to content
CalcEngine

Number Base Converter (Binary, Octal, Decimal, Hex)

Binary ↔ octal ↔ decimal ↔ hex with steps.

Formulas and rates last reviewed · How we check

Your inputs

Its base

Results update instantly as you type.

Calculating…

 

 

Share this result

Shared messages and images include the CalcEngine name and a link that reopens these exact inputs.

Was this calculator helpful?

For education only: Results are rough estimates, not a substitute for professional design, building codes or site checks. Consult a qualified engineer (a structural engineer for buildings, a licensed electrician for wiring) before buying materials or starting work.

How the Number Base Converter (Binary, Octal, Decimal, Hex) works

Each digit is multiplied by a power of the base; converting to binary repeatedly divides by 2.

Decimal = Σ digit × baseⁿ
Decimal → binary: divide by 2, read remainders bottom-up
Hex digit = 4 bits; octal digit = 3 bits

Worked example

255 in decimal

  1. Binary: 1111 1111
  2. Octal: 377
  3. Decimal: 255

255 in binary: 1111 1111

Frequently asked questions

What is 255 in binary?

11111111 (8 bits), FF in hex and 377 in octal.

How do I convert hex to binary quickly?

Replace each hex digit with its 4-bit binary value: F = 1111, A = 1010.

Can I enter 0x or 0b prefixes?

Yes, prefixes like 0x and 0b are ignored.

Is there a size limit?

No practical limit: it uses big-integer arithmetic.

Related calculators