Skip to content
Official PYQ · 2002

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

Explain with AI

In 2′s2's complement addition, overflow

Choose one option
View worked solution

Answer: B

In 22's complement representation, overflow occurs when the result of an arithmetic operation falls outside the representable range of the given number of bits.

Let's analyze the options:

  • Option B is correct: When adding a positive number and a negative number, the magnitude of the sum is always strictly less than or equal to the magnitude of the larger operand. Consequently, the result is guaranteed to lie within the representable range, meaning overflow can never occur.
  • Option A is incorrect: A carry out of the sign bit does not necessarily indicate an overflow. For example, in 44-bit 22's complement, adding −1-1 (111121111_2) and −1-1 (111121111_2) yields −2-2 (111021110_2) with a carry-out of 11 from the sign bit, but no overflow has occurred.
  • Option C is incorrect: Overflow is flagged when the carry into the sign bit (CinC_{\text{in}}) and the carry out of the sign bit (CoutC_{\text{out}}) differ (i.e., Cin⊕Cout=1C_{\text{in}} \oplus C_{\text{out}} = 1). If they match, there is no overflow.

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

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