GATE 2007
October 14, 2023GATE 2007
October 14, 2023GATE 2017 [Set-1]
Question 9
|
When two 8-bit numbers A7…A0 and B7…B0 in 2’s complement representation (with A0 and B0 as the least significant bits) are added using a ripple-carry adder, the sum bits obtained are S7…S0 and the carry bits are C7…C0. An overflow is said to have occurred if
the carry bit C7 is 1
|
|
all the carry bits (C7,…,C0) are 1
|
|
Question 9 Explanation:
⇾ Overflow may occur when numbers of same sign are added
i.e., A7 = B7
⇾ Overflow can be detected by checking carry into the sign bits (Cin) and carry out of the sign bits (Cout).
⇾ Overflow occurs iff A7 = B7 and Cin ≠ Cout
These conditions are equivalent to
Consider
Here A7 = B7 = 1 and S7 = 0
This happens only if Cin = 0
Carry out Cout=1 when
Similarly, in case of
Cin=1 and Cout will be 0.
i.e., A7 = B7
⇾ Overflow can be detected by checking carry into the sign bits (Cin) and carry out of the sign bits (Cout).
⇾ Overflow occurs iff A7 = B7 and Cin ≠ Cout
These conditions are equivalent to
Consider
Here A7 = B7 = 1 and S7 = 0
This happens only if Cin = 0
Carry out Cout=1 when
Similarly, in case of
Cin=1 and Cout will be 0.
Correct Answer: C
Question 9 Explanation:
⇾ Overflow may occur when numbers of same sign are added
i.e., A7 = B7
⇾ Overflow can be detected by checking carry into the sign bits (Cin) and carry out of the sign bits (Cout).
⇾ Overflow occurs iff A7 = B7 and Cin ≠ Cout
These conditions are equivalent to
Consider
Here A7 = B7 = 1 and S7 = 0
This happens only if Cin = 0
Carry out Cout=1 when
Similarly, in case of
Cin=1 and Cout will be 0.
i.e., A7 = B7
⇾ Overflow can be detected by checking carry into the sign bits (Cin) and carry out of the sign bits (Cout).
⇾ Overflow occurs iff A7 = B7 and Cin ≠ Cout
These conditions are equivalent to
Consider
Here A7 = B7 = 1 and S7 = 0
This happens only if Cin = 0
Carry out Cout=1 when
Similarly, in case of
Cin=1 and Cout will be 0.
Subscribe
Login
0 Comments