Two’s Complement Calculator

Get the binary form of negatives.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

Two's complement is the standard method computers use to represent signed, positive and negative, integers in binary: to find the two's complement of a number, you invert every bit of its binary representation, called the one's complement, and then add 1. This scheme lets a single set of binary addition circuitry handle both addition and subtraction without any special-case logic, since subtracting a number is the same as adding its two's complement.

Virtually every modern CPU, from microcontrollers to desktop processors, uses two's complement internally to store signed integers because it has exactly one representation for zero, unlike sign-magnitude or one's-complement encoding which have both a “positive zero” and “negative zero,” and because overflow behavior is well-defined and consistent, making it foundational knowledge for computer science students, embedded systems engineers, and anyone debugging low-level binary or hexadecimal data.

This calculator takes a number and a bit width and returns its exact two's complement binary representation.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators