Binary Converter

Convert signed integers and fractions between bases 2-36 without losing large-number precision. Repeating and truncated fractions are labelled.

Base 2-36 Exact large integers Fraction status Local processing
Number base converter No prefixes or separators in the input. Use one radix point for fractions.

Up to 512 digits. Integers use exact arbitrary-precision math. Fractional outputs show exact, repeating, or truncated status.

IEEE 754 floating-point layout

This panel deliberately uses browser IEEE 754 Number/Float32 rounding. It is separate from the exact base converter.

Signed 32-bit bitwise operations
Binary Arithmetic

How to convert numbers between bases

A number base (or radix) determines the available digits and each digit's positional value. Decimal uses 0-9, binary uses 0-1, and hexadecimal uses 0-9 plus A-F. This converter supports signed values in bases 2-36. Integer conversion uses arbitrary-precision math, so values larger than JavaScript's safe-integer limit are not rounded.

  1. Pick the base of the number you already have from the Input dropdown (decimal, binary, hex, octal, or Custom for bases 2-36).
  2. Type up to 512 digits, with an optional sign and one radix point. Do not add programming prefixes such as 0b or grouping separators.
  3. Read each result's precision label. Exact values terminate; repeating cycles appear in parentheses; an ellipsis means the display stopped after 32 fractional digits.
  4. Use the method panel to see the exact decimal integer or reduced rational value behind the display.

To convert by hand, multiply each digit by its base raised to the digit's position and sum them for the decimal value (for example binary 1011 = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 11). To go from decimal to another base, divide repeatedly by the target base and read the remainders from bottom to top. Because each hex digit maps to exactly 4 binary bits and each octal digit to 3 bits, hex and octal are compact shorthands for binary.

The supporting panels have narrower contracts: IEEE 754 deliberately shows rounded browser Float32 and Float64 layouts; two's complement checks signed 8/16/32/64-bit ranges; bitwise operations use signed 32-bit semantics; and binary arithmetic accepts signed integers with exact large-number results. All calculations run locally in this browser tab and are not saved automatically.

Frequently Asked Questions

What number bases and input sizes are supported?
The exact converter supports bases 2 through 36 and up to 512 input digits. Signed integers use arbitrary-precision BigInt math rather than JavaScript Number conversion.
How are fractional conversions represented?
The input is parsed as an exact rational number. Terminating results are labelled exact, repeating cycles appear in parentheses, and longer expansions are labelled truncated after 32 fractional digits.
What is two's complement and why is it important?
The tool shows signed 8, 16, 32, and 64-bit encodings only when the integer fits that width. An out-of-range width is labelled instead of wrapping silently.
What bitwise operations are available?
AND, OR, XOR, NOT, left shift, and arithmetic right shift use signed 32-bit integer semantics. Inputs outside -2147483648 through 2147483647 are rejected.
Is the IEEE 754 panel exact?
No. It intentionally shows browser Float32 and Float64 layouts and therefore follows floating-point rounding. It is separate from the exact arbitrary-precision base converter.
Copied!