Skip to main content

2's complement: 15 − 20

Short answer

8-bit: 15 = 00001111, 20 = 00010100. 2's complement of 20 = 11101100. Add: 00001111 + 11101100 = 11111011, no carry, negative. 2's complement of result gives 00000101 = 5, so 15 − 20 = −5.

Find: (15)10 − (20)10 = ?, use 2's complement method.

Use 8-bit numbers.

  • 15 = 00001111
  • 20 = 00010100
  1. 1's complement of 20 = 11101011; add 1 gives the 2's complement 11101100.
  2. Add:
   00001111   (15)
 + 11101100   (2's complement of 20)
 ----------
   11111011
  1. No end carry, so the result is negative.
  2. Magnitude: 2's complement of 11111011 = 00000100 + 1 = 00000101 = 5.

Answer: 15 − 20 = −5

✓ Answer checked by Claude Opus 5.5 (high effort)

All Basic Electronics Engineering chapter 6 questions →