GATE 2024 CS (CS1) – Question 13
Consider a system that uses 5 bits for representing signed integers in 2's complement format. In this system, two integers $A$ and $B$ are represented as $A$=01010 and $B$=11010. Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) $A-B$
Explanation
A=10, B=−6. Range is −16 to 15. A+B=4, B−A=−16, 2B=−12 all fit. A−B=16 exceeds 15, so overflow.
More Number Representation and Floating Point Arithmetic questions
- GATE 2024 CS (CS2) Q14
- GATE 2023 CS Q45
- GATE 2022 CS Q41
- GATE 2020 CS Q39
- GATE 2018 CS Q43
- GATE 2014 CS (CS2) Q55
All Number Representation and Floating Point Arithmetic questions →