CalcDepo

Decimal to Binary, Octal and Hex Converter

Convert a whole number into other bases.

Inputs

Results

Binary11111111
Octal377
HexadecimalFF

Not what you need? Search by intent

Describe what you want to find β€” β€œbinary conversion” β€” and jump to the right calculator.

How to use the decimal to binary, octal and hex calculator

Convert a whole number into other bases. Enter decimal number in the field above; the binary, octal, hexadecimal are computed instantly and plotted on the chart so you can see how the answer changes.

Formula

Binary = Math.floor(n).toString(2)
Octal = Math.floor(n).toString(8)
Hexadecimal = Math.floor(n).toString(16).toUpperCase()

Variables

  • n β€” Decimal number

Worked example

With decimal number = 255, the calculator gives binary β‰ˆ 11111111; octal β‰ˆ 377; hexadecimal β‰ˆ FF.

Frequently asked questions

What is the formula for the decimal to binary, octal and hex calculation?

Binary = Math.floor(n).toString(2). Octal = Math.floor(n).toString(8). Hexadecimal = Math.floor(n).toString(16).toUpperCase(). Here n is decimal number.

What inputs do I need for the decimal to binary, octal and hex converter calculator?

You need decimal number. Each field is pre-filled with a typical example so you can see how the result responds as you edit the numbers.

How do I use this calculator?

Type values into the input fields. Results and the chart update instantly. Use Reset to restore the example values, Copy results to paste them elsewhere, or Share to copy a link that preserves your inputs.

Is the result exact?

Calculations use standard formulas and double-precision arithmetic, then display about seven significant figures. Real-world measurements carry uncertainty, so treat results as estimates unless your inputs are exact.

Related calculators

More in Algebra & Calculus: Percentage Β· Percent Increase and Decrease Β· Ratio Simplifier Β· GCD and LCM Β· Divisor Count Β· Quadratic Equation Β· Linear Equation Β· System of Two Linear Equations