Two’s Complement Calculator
Get the binary form of negatives.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- 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?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)