Skip to content
Official PYQ · 2002

GATE CS 2002 Q1.16 — Number Representations (Fixed and Floating Point)

Explain with AI

Sign extension is a step in 

Choose one option
View worked solution

Answer: D

Sign extension is the process of increasing the number of bits of a binary representation of a signed number while preserving its original value and sign.

This is achieved by replicating the most significant bit (the sign bit) into the newly added higher-order bit positions.

Example:

  • Converting an 8-bit signed integer to a 16-bit signed integer:
  • Positive number +5+5:
    • 8-bit: 0000 0101
    • 16-bit (sign-extended): 0000 0000 0000 0101
  • Negative number −5-5 (in 2's complement):
    • 8-bit: 1111 1011
    • 16-bit (sign-extended): 1111 1111 1111 1011

Therefore, sign extension is specifically used when converting a signed integer from one size to another (Option D).

Analysis of other options:

  • A. Floating point multiplication: Involves multiplying the significands and adding the exponents. It does not use sign extension.
  • B. Signed 16-bit integer addition: Performs direct binary addition on two 16-bit operands. Sign extension is not a step of the addition operation itself.
  • C. Arithmetic left shift: Shifts the bits to the left and fills the vacant least significant bit positions with 00.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Number Representations (Fixed and Floating Point) questions