Binary Converter
Convert batches of binary, decimal, hexadecimal and octal integers on one screen. Select an 8-, 16-, 32- or 64-bit width and choose unsigned values or signed two’s-complement interpretation.
Your result
How the calculation works
Value = sum(digit × base^position). For a signed w-bit value, range is −2^(w−1) through 2^(w−1)−1. A negative value is encoded as value + 2^w; a non-decimal bit pattern with its sign bit set decodes as encoded value − 2^w.
Worked example
In signed 8-bit mode, decimal −1 becomes binary 11111111, hexadecimal FF and octal 377. Unsigned decimal 42 becomes binary 00101010 and hexadecimal 2A.
Assumptions and limitations
Only whole integers are supported. Batch size is 100. Prefixes 0b, 0x and 0o are accepted only for their matching input base. Decimal signed input uses a minus sign; non-decimal signed input is an encoded nonnegative bit pattern. BigInt keeps 64-bit integer arithmetic exact.
Choose the width used by your file format or device. The same FF pattern means 255 unsigned or −1 signed in eight bits; selecting signed mode changes interpretation, not the stored bits.
Common questions
Why does a value fail the width check?
It falls outside the selected signed or unsigned integer range. Increase the width or correct the representation.
Method reviewed 2026-10-08. Calculation standards · Report an issue