Skip to content
D DocNectar

Free Two's Complement Converter

Convert between decimal and two's complement binary for a chosen bit width (8, 16, or 32-bit).

100% Free No Signup Works on all devices

Built and fact-checked by the DocNectar team — see our editorial standards

Thanks for rating!

Key Features

Instant Calculation

Get accurate results in real time with our optimized algorithm.

Mobile Friendly

Fully responsive design. Works on all devices & screen sizes.

Privacy Focused

Your data stays on your device. We don't store any inputs.

100% Free

No hidden costs. This tool is completely free forever.

Two's complement is how virtually all modern computers represent signed (positive and negative) integers in binary, using the leading bit to indicate sign.

This calculator converts between decimal and two's complement binary for a chosen bit width.

How it works

Choose a direction and bit width (8, 16, or 32-bit), then enter a value. Positive numbers convert like standard binary. Negative numbers are found by adding 2 to the power of the bit width to the (negative) decimal value, then converting that to binary.

  1. Enter direction.
  2. Enter bit width.
  3. Enter value.
  4. Click Calculate to see your results.

Examples

-5 in 8-bit

The decimal value -5 in 8-bit two's complement is 11111011.

Who should use it

  • Coursework in computer architecture or digital logic.
  • Debugging low-level code that works directly with signed binary values.

Industry applications

  • Computer science and software engineering education
  • Embedded systems and low-level programming

Advantages

  • Shows the full formula and working, not just the final answer.
  • Supports the three most common bit widths used in practice.

Limitations

  • Limited to 8, 16, and 32-bit widths.

Common mistakes to avoid

  • Entering a value outside the valid range for the selected bit width (e.g., 200 in an 8-bit signed field).
  • Reading a two's complement binary value as if it were unsigned, missing that a leading 1 means the value is negative.

Best practices

  • Always confirm the bit width matches what your target system actually uses — the same binary pattern means a different decimal value at different bit widths.

Tips

  • A quick way to negate a two's complement number by hand: flip every bit, then add 1 — this is exactly equivalent to the "add 2^n" formula used in this calculator.

Frequently asked questions

Yes, with no signup and no limit on how many conversions you run.
In two's complement, the leading (leftmost) bit is the sign bit — a leading 1 means the value is negative, and a leading 0 means it's zero or positive.
For an n-bit width, the range is -2^(n-1) to 2^(n-1) - 1 — for example, 8-bit ranges from -128 to 127.
Two's complement lets hardware use the same addition circuitry for both positive and negative numbers without special-casing subtraction, which is why it's the near-universal standard in computing.

Get new calculators and guides in your inbox

No spam — just new tools like Two's Complement Converter and practical guides.

Favorites