Question 42

What shall be the 2's complement representation of 24 in a 16 bit computer?

  1. A1111 1111 1110 1011
  2. B1111 1111 1110 1001
  3. C1111 1111 1110 0111
  4. D1111 1111 1110 1000
Show answerHide answer

Correct answer: (D) 1111 1111 1110 1000

Explanation

24 = 0000 0000 0001 1000. Invert the bits (1111 1111 1110 0111) and add 1 to get 1111 1111 1110 1000, which is −24 in 2's complement.

From DSSSB TGT Computer Science Practice Set 2

This is question 42 of DSSSB TGT Computer Science Practice Set 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.