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
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.