Number Converters

Two's Complement Converter

This two's complement converter shows how signed integers are stored in fixed-width binary. Enter a decimal number and a bit width to see its two's complement pattern, or decode a pattern back to its signed value.

Loading tool…

Your input is processed locally in your browser and is not uploaded or stored.

What this tool does

The standard scheme for encoding signed integers in binary using the most significant bit as sign. This two's complement converter is free, works on desktop and mobile, and requires no sign-up.

Also useful for: binary to 2's complement, binary to two's complement, two's complement to binary, two's complement to binary calculator.

Features

  • Choose 8, 16, 32 or 64-bit width
  • Encode decimal to bit pattern
  • Decode pattern to signed value
  • Shows hex form

How to use it

  1. Pick a bit width
  2. Enter a signed decimal value or a bit pattern
  3. Read the complementary representation

Examples

8-bit negative -111111111

Common uses

  • Understanding integer overflow
  • Low-level and embedded debugging
  • Teaching signed arithmetic

Good to know

  • Value must fit the chosen bit width

Frequently asked questions

Why the most significant bit?

In two's complement the top bit carries negative weight, which makes addition uniform for signed and unsigned values.

Popular searches for this tool