P is a 16-bit signed integer. The 2’s complement representation of P is…

2010

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 is

  1. A.

    (C3D8)16

  2. B.

    (187B)16

  3. C.

    (F878)16

  4. D.

    (987B)16

Attempted by 317 students.

Show answer & explanation

Correct answer: A

Step 1: Determine the signed value of P from (F87B)16.

  • MSB is 1, so the number is negative in two's complement.

  • Invert F87B -> 0784; add 1 -> 0785. 0x0785 = 1925 decimal, so P = -1925.

Step 2: Compute 8 * P.

  • 8 * (-1925) = -15400.

  • Convert magnitude 15400 to hex: 15400 = 0x3C28.

  • Take two's complement to represent the negative value: invert 3C28 -> C3D7, add 1 -> C3D8.

Answer: The 16-bit two's complement representation of 8 * P is (C3D8)16.

Note: The result fits within the 16-bit signed range (-32768 to 32767), so there is no overflow.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir