Binary and Hex Calculator

Convert signed integers exactly between binary, octal, decimal and hexadecimal without floating-point precision loss.

Decimal integer255

Signed integers; no fractional digits or two’s-complement interpretation.

Decimal integer

255

  • Binary11111111
  • Octal377
  • HexadecimalFF

Negative results use a minus sign, not a fixed-width bit pattern. Arbitrary-precision conversion is limited to 1,024 input digits for responsiveness.

How this was calculated

Read each digit by positional value in the selected base.

Convert the exact integer using repeated base division; no floating-point rounding is used.

Formula and method

Each digit contributes its value multiplied by a power of the input base. Repeated division expresses the same integer in another base.

Worked example

Hexadecimal FF represents 15 × 16 + 15 = 255, equivalent to binary 11111111 and octal 377.

Frequently asked questions

Does it interpret negative values as two’s complement?

No. Negative values retain a minus sign. Fixed-width machine encodings require a bit width and use different rules.

Last updated . Results are estimates for informational purposes only.