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

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.

Quiz of this Question

My Personal Notes arrow_drop_up

Improved By : vibhu104