Gate2017 cs Q29

0. 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

  • Option : C
  • Explanation :
    Overflow flag indicates an over flow condition for a signed operation. Some points to remember in a signed operation:
    * MSB is always reserved to indicate sign of the number.
    * Negative numbers are represented in 2’s – complement.
    * An overflow results in invalid operation.
    2's complement overflow rules:
    * If the sum of two positive numbers yields a negative result, the sum has- overflowed.
    * If the sum of two negative number yields a positive result, the sum has overflowed.
    * Otherwise, the sum has not overflowed.
    Overflow for signed numbers occurs when the carry-in into the MSB (most significant bit) is not equal to carry-out. Conveniently, an XOR-operation on these two bits can quickly determine if an overflow condition exists.
    Therefore, ((A7.B7) ⊕ S7 = (A7.B7.S7 + A7.B7.S7) = 1 has overflowed.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *