GATE / CS ARCHIVE

GATE CSE 2010 / QUESTION 8

Multiplying a signed hexadecimal integer

Digital Logic · Number Systems & Computer Arithmetic · Full GATE CSE 2010 paper

GATE 2010, Q8 1 mark · MCQ
Report issue

Number Systems & Computer Arithmetic

Question 8, GATE 2010: A signed 16-bit integer P has two’s-complement hexadecimal representation F87B. What is the 16-bit two’s-complement representation of 8P?
Options: (A) C3D8; (B) 187B; (C) F878; (D) 987B.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Step through it (5 steps)

The 16-bit pattern F87B represents 0xF87B−0x10000=−1925. Multiplication by 8 gives −15400, which is within the signed 16-bit range. Its two’s-complement encoding is 65536−15400=50136=0xC3D8, A; equivalently shift F87B left three positions and retain 16 bits.

The top hexadecimal digit F sets the sign bit, so interpreting F87B as an unsigned positive number without subtracting 216 gives the wrong signed value. The range check −32768≤−15400≤32767 confirms that multiplying by eight does not overflow here. Hexadecimal shifting also gives F87B×8=7C3D8, whose low four digits are C3D8.

Original paper, page 2