Number base converter

Convert signed integers between binary, decimal and hexadecimal.

Jump to result

Your inputs

Updates as you type

decimal integer

255

Signed binary
11111111
Signed hexadecimal
FF
16-bit two's complement
0000000011111111

BigInt arithmetic preserves integer precision.

Calculations happen in your browser. Saving is optional.

How to use this tool

Choose the input base and enter a signed integer or a binary/hex two's-complement pattern.

For two's complement, state the bit width before interpreting the high bit as negative. Fractional values are outside this tool.

Positional integer conversion; two's complement interprets the high bit as negative

Worked example

255 · decimal integer

Fixed example using the settings below. Monetary examples use USD; dates and times use their stated reference values. This example stays unchanged when you edit your calculation.

Example inputs
  • Signed integer or two's-complement bit pattern: 255
  • Input base: Decimal
  • Input representation: Signed magnitude text (+/−)
  • Bit width for two's complement: 16

Method illustration: Decimal 255 is binary 11111111 and hex FF. In 8-bit two's complement, FF is −1.

Assumptions and limits

  • Supports integers up to 256 bits. Signed text uses an explicit minus; two's-complement input requires binary/hex and a stated width.
  • A two's-complement output is shown only if the signed value fits the chosen width.

Check or report a result

Check the units, selected calculation and assumptions first. Compare the fixed example above with your inputs to identify what changed.

Report a calculation issue with the page address, hypothetical inputs, result displayed and result expected. Do not include passwords, bank details or other private information.