Skip to content
GK24
Computer AwarenessHard

The 2's complement of the binary number 1010 is:

  1. A.0101
  2. B.0110
  3. C.1011
  4. D.1001

Correct answer

B. 0110

Explanation

The correct answer is B, 0110. The 2's complement is found in two steps. First take the 1's complement by changing every 0 to 1 and every 1 to 0; for 1010 this gives 0101. Then add 1 to that result: 0101 plus 1 equals 0110. So the 2's complement of 1010 is 0110. Computers store negative numbers in 2's complement form because the same adder circuit can then perform both addition and subtraction, which saves hardware. Option A is wrong because 0101 is only the 1's complement, the first step, and forgetting to add one is the commonest mistake in this question. Option C is wrong because 1011 is simply 1010 with the last bit changed. Option D is wrong because 1001 is neither complement of the given number. Remember: 2's complement equals 1's complement plus one.

Read the full article: Number Systems and Data Representation in Computers

View all