Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE CS 2010 | Question 8

  • Last Updated : 28 Jun, 2021

P is a 16-bit signed integer. The 2’s complement representation of P is (F87B)16.The 2’s complement representation of 8*P
(A) (C3D8)16
(B) (187B)16
(C) (F878)16
(D) (987B)16


Answer: (A)

Explanation: P = (F87B)16 is -1111 1000 0111 1011 in bianry

Note that most significant bit in the binary representation is 1, which implies that the number is negative. To get the value of the number perform the 2’s complement of the number. We get P as -1925 and 8P as -15400

Since 8P is also negative, we need to find 2’s complement of it (-15400)
Binary of 15400 = 0011 1100 0010 1000
2’s Complement = 1100 0011 1101 1000 = (C3D8)16

Quiz of this Question

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.

My Personal Notes arrow_drop_up
Recommended Articles
Page :