Two's Complement Calculator
Show how a whole number, positive or negative, is stored in binary as two's complement. It runs in your browser.
1 Fill in the boxes
2 Your answer
Your answer shows here as you type.
How to use the Two's Complement Calculator
- Type a whole number, positive or negative.
- Choose the size in bits.
- Read the binary pattern in the first row.
Frequently asked questions
What is two's complement?
It is how computers store negative whole numbers: flip every bit of the positive number, then add one.
Why does the size matter?
The same number has a different pattern at 8 bits than at 16 bits, and a number too big for the size cannot be stored.
Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.