Arithmetic in 7-bit 2S Complement

Enter two decimal integers (A and B), select the bit length and choose “2’s” or “1’s” complement. Then pick **Add** or **Subtract**. The page will:

  • Convert A and B into the chosen complement format.
  • Perform column-by-column addition (or “A + (-B)” if subtract).
  • Decode the result back to decimal.
  • State if there is an overflow.
Results

No results yet. Fill in and click “Compute.”

Example Problems

Subtract 13 from 27 in 7 bits (2’s comp).
Subtract 45 from 98 in 12 bits (2’s comp).
Add 13 + 27 in 6 bits (2’s comp).

For each, see if the final result is in range. If not, overflow is indicated.

13-bit 2’s or 1’s complement:
- 91 - 499
- 379 + 98
You can switch “System” to “1’s complement,” set “Bit Length” to 13, type in A=91, B=-499 (or 379, 98), then check steps & overflow.