Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE-CS-2016 (Set 1) | Question 17

  • Last Updated : 27 Sep, 2021

The 16-bit 2’s complement representation of an integer is 1111 1111 1111 0101; its decimal representation is
 
Note : This question was asked as Numerical Answer Type.
(A) 10
(B) 11
(C) -10
(D) -11


Answer: (D)

Explanation: Number is given in 2’s complement representation. Since, MSB is 1, so value of this number is negative and we have to take 2’s complement of given number then find its decimal value.
Therefore,
2’s complement of (1111 1111 1111 0101)
= (1’s complement of (1111 1111 1111 0101) + 1)
= ((0000 0000 0000 1010) + 1)
= 1011 in binary
= 11

It is negative, so answer is (- 11).
Option (D) is correct.

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.



Quiz of this Question

My Personal Notes arrow_drop_up

Start Your Coding Journey Now!