A computer uses 8-bit 2's complement representation. Which of the following operations will cause overflow?
Computer Applications ·Previously asked in JKSSB Inspector 2026
View the full solved paper: JKSSB Inspector (Forest Ecology & Environment) 2026
Question
A computer uses 8-bit 2's complement representation.
Which of the following operations will cause overflow?
- A. 01010101 + 00110011
- B. 10011001 + 10101010
- C. 01111111 + 00000001
- D. 11110000 + 00010000
This question was dropped from the final answer key, so it has no correct option — marks were awarded to all candidates.
Detailed Solution & Explanation
This question was discarded and no marks were awarded for it. It is reproduced here for practice, with a full explanation of why it could not be answered as set.
Key Points
- In 8-bit 2's complement representation, the range of values is −128 to +127. Overflow occurs when the result of an addition falls outside this range.
- Working through each option:
| Option | Binary addition | Decimal | Result | Overflow? |
|---|---|---|---|---|
| A | 01010101 + 00110011 | +85 + 51 | +136 | Yes — exceeds +127 |
| B | 10011001 + 10101010 | −103 + (−86) | −189 | Yes — below −128 |
| C | 01111111 + 00000001 | +127 + 1 | +128 | Yes — exceeds +127 |
| D | 11110000 + 00010000 | −16 + 16 | 0 | No |
- Three of the four options — A, B and C — all cause overflow, while the question asks for a single one. The question was therefore defective as framed, and the Board rightly discarded it.
Additional Information
- How to read an 8-bit 2's complement number:
- If the most significant bit is 0, the number is positive and read directly.
- If the most significant bit is 1, the number is negative; its magnitude is found by inverting all bits and adding 1.
- Example: $10011001$ → invert to $01100110$ → add 1 → $01100111 = 103$, so the value is −103.
- The overflow rules for signed addition:
- Adding two positive numbers and obtaining a negative result signals overflow.
- Adding two negative numbers and obtaining a positive result signals overflow.
- Adding numbers of opposite signs can never overflow — which is exactly why option D is safe.
- Why 2's complement is used: it represents zero uniquely, and allows subtraction to be performed by the same adder circuit as addition, so no separate subtraction hardware is needed.
- Ranges by width: 8-bit gives −128 to +127; 16-bit gives −32,768 to +32,767; in general $n$ bits give $-2^{n-1}$ to $2^{n-1} - 1$.
Topics covered: Computer Applications Number Systems