Skip to main content

2's complement: 42 − 115

Short answer

42 = 00101010, 115 = 01110011 (8-bit). 2's complement of 115 = 10001101. Sum: 00101010 + 10001101 = 10110111, no carry. Magnitude from 2's complement is 01001001 = 73, result −73.

Perform the subtraction using 2's complement method: 42(10) − 115(10)

We compute 42 − 115 using 8-bit numbers.

  • 42 = 00101010
  • 115 = 01110011
  1. 1's complement of 115 = 10001100; add 1: 2's complement = 10001101.
  2. Add to 42:
   00101010   (42)
 + 10001101   (2's complement of 115)
 ----------
   10110111
  1. There is no carry out of the MSB, so the result is negative.
  2. Magnitude = 2's complement of 10110111 = 01001000 + 1 = 01001001 = 64 + 8 + 1 = 73.

Answer: 42 − 115 = −73

✓ Answer checked by Claude Opus 5.5 (high effort)

All Basic Electronics Engineering chapter 6 questions →