GATE CS 2024 Set 1 — Question 13
MCQ+1 / -0.33MediumSigned Number RepresentationsNumber Systems & ArithmeticDigital LogicBinary Arithmetic & Overflow
Digital Logic → Number Systems & Arithmetic → Binary Arithmetic & Overflow
Last updated
Question
Consider a system that uses 5 bits for representing signed integers in 2’s complement format. In this system, two integers and are represented as and . Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?
A.
B.
C.
D.
Correct answer
(B) A - B
Solution
In a 5-bit 2's complement system, the range of representable integers is from to , i.e., from to .Given:
. Since the MSB is 0, it is positive. Value .
. Since the MSB is 1, it is negative. To find the magnitude, we take the 2's complement: invert bits () and add 1 (), which is 6. So, .Let's evaluate the options:(A) . This is within the range . No overflow.(B) . The maximum positive value representable is 15. Since , an arithmetic overflow occurs.(C) . This is within the range . No overflow ( is represented as ).(D) . This is within the range . No overflow.Thus, the operation results in an overflow.
. Since the MSB is 0, it is positive. Value .
. Since the MSB is 1, it is negative. To find the magnitude, we take the 2's complement: invert bits () and add 1 (), which is 6. So, .Let's evaluate the options:(A) . This is within the range . No overflow.(B) . The maximum positive value representable is 15. Since , an arithmetic overflow occurs.(C) . This is within the range . No overflow ( is represented as ).(D) . This is within the range . No overflow.Thus, the operation results in an overflow.
More questions on Number Systems & Arithmetic
2024 Set 2 Q14The format of a single-precision floating-point number as per the IEEE 754 standard is:…2024 Set 1 Q28Consider the circuit shown below where the gates may have propagation delays. Assume that all…2024 Set 2 Q30For a Boolean variable , which of the following statements is/are FALSE?2024 Set 1 Q47Consider a Boolean expression given by . Which of the following…2024 Set 2 Q49Which of the following is/are EQUAL to in radix- (i.e., base-) notation?
Practice GATE CS PYQs with adaptive difficulty
Timed practice, skill tracking, and AI explanations — free to start.
Start practicing free