Multiple choice

In a certain machine, the sum of an integer and its 1's complement is 220-1. What is the size of (int), in bits?

  1. 16

  2. 32

  3. Unpredictable

  4. None of above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The sum of an integer and its 1's complement is always a sequence of all 1s (e.g., for 8 bits, 00000001 + 11111110 = 11111111). The value 2^20 - 1 is a specific number, not a general property of integer sizes.