GATE | GATE CS 2010 | Question 8
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
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
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.