IGDTUW 2026 — Computer PYQ
IGDTUW | Computer | 2026Which of the following operations can show overflow in computer arithmetic?
Choose the correct answer:
- A.
Addition and Subtraction
(Correct Answer) - B.
Subtraction only
- C.
Multiplication only
- D.
Division only
Addition and Subtraction
Explanation
The correct option is (a) Addition and Subtraction.
Detailed Solution & Explanation
In computer arithmetic, an overflow occurs when the result of an arithmetic operation exceeds the maximum or minimum limit of the numerical range that the processor's register can represent (given a fixed number of bits, such as 8, 16, 32, or 64 bits).
Why Addition and Subtraction Cause Overflow:
Addition: When two signed numbers of the same sign (both positive or both negative) are added together, the magnitude of the result can exceed the capacity of the allocated bits.
Example: If we add two large positive numbers, the result might inadvertently flip the sign bit to 1, making the hardware falsely interpret the output as a negative number.
Subtraction: Subtracting a negative number from a positive number (which is equivalent to adding two positive numbers) or subtracting a positive number from a negative number can similarly exceed the representable boundaries.
Hardware Condition for Overflow:
In a standard Arithmetic Logic Unit (ALU), the overflow condition (V) for signed n-bit numbers during addition/subtraction is detected using the carry bit out of the most significant magnitude bit (Cn−1) and the carry bit out of the sign bit (Cn):
V=Cn−1⊕Cn
Where ⊕ denotes the XOR operation. If the two carries are different, an overflow has occurred.
