Ones Complement

Work out the ones complement, the twos complement and the signed reading of a binary value at any bit width.

Complement a binary value

Value: —
Unsigned decimal: —
Ones complement: —
Twos complement: —
Signed value: —
Enter a binary value to see both complements.

How to use the Ones Complement

  1. Choose the bit width you are working at.
  2. Type the binary value, padded or unpadded.
  3. Read the ones complement, twos complement and signed value.

Features

Advertisement

Frequently Asked Questions

Common questions about the free online ones complement.

The ones complement flips every bit of a value, so 00101011 becomes 11010100 at the same bit width.
The twos complement is the ones complement plus one, and it is how computers store negative whole numbers.
Adding one makes the pattern of zero unique and makes binary addition and subtraction work with the same hardware.
If the leading bit is one the number is negative. Take the twos complement of the pattern and put a minus sign in front.
It does. The complement is always taken across the whole chosen width, so an 8-bit and a 16-bit answer will differ.
Values are padded with leading zeros when short and only the lowest bits are kept when longer than the width.
Yes. Complementing an all zeros pattern wraps past the width, and the tool reports when that happens.
In ones complement an all ones pattern means negative zero, which is one reason twos complement took over.
Yes. The ones complement is exactly the bitwise NOT of the value across the selected width.
No. All of the bit maths happens locally in your browser.

Last updated: October 10, 2026