Two's Complement Calculator
Convert between binary and decimal using two's complement representation. Find the two's complement of binary numbers and perform signed binary operations.
Range: -2^(n-1) to 2^(n-1)-1 (for selected bit length)
Result
-
Range Information
-
Step-by-Step Solution
Select an operation and enter values, then click "Calculate" to see the step-by-step solution.
What is Two's Complement?
Two's complement is a mathematical operation used to represent signed integers in binary. It's the most common method for representing negative numbers in computer systems.
Formula: Two's complement = One's complement + 1
Key Features
- Single representation for zero
- Arithmetic operations work without special handling
- Range: -2^(n-1) to 2^(n-1)-1
- Most significant bit (MSB) indicates sign
- 1 = negative, 0 = positive
Common Bit Length Ranges
- 4-bit: -8 to 7
- 8-bit: -128 to 127
- 16-bit: -32,768 to 32,767
- 32-bit: -2,147,483,648 to 2,147,483,647