Question 152Asked in DSSSB TGT Computer Science, 25 Jun 2023, Shift 3 (4:30 PM)

What would be the 2's complement representation of the —15 decimal value?

  1. A1001
  2. B1111111
  3. C1111
  4. D10001
Show answerHide answer

Correct answer: (C) 1111

Explanation

Note: the answer key gives (C), but 1111 is −1 in 4-bit two's complement, and −15 cannot fit in 4 bits. With 5 bits, 15 = 01111, so −15 = 10001 (option D).

From DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 3 (4:30 PM)

This is question 152 of DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 3 (4:30 PM). 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.