GATE 2002: In 2’s complement addition, overflow (a) is…

0

GATE 2002:
In 2’s complement addition, overflow
(a) is flagged whenever there is carry from sign bit addition
(b) cannot occur when a positive value is added to a negative value
(c) is flagged when the carries from sign bit and previous bit match
(d) None of the above

Ravi Garg edited question
    0
    Hima Mehta (anonymous)

    oops its B here ..but just remember the following conditions for overflow 1> if the sign bit numbers are different then overflow never occurs if both are same both 0 or both 1 then overflow occurs iff the result of adding it is different .
    Ex.. 0001+0111 — > 1000 both Lsb are 0 but result is 1 so here 4 bit overflow..
    .
    .
    2) second condition is xor of the left two carry bits is 1 then its overflow.. this condition is specifically for twos complement …
    and to crosscheck .. just perform the addition or subtraction in decimal… if it can’t fit into the given figits… ie for above example its 4 bit addition… and ans requires more than that.. 5 bits…

    Hima Mehta answered
      0
      Madhav Purohit (anonymous)

      c for +ve sign bit wud b 0 nd 4 -ve it wud b 1 so no chance of betting overflow…!!:-)

      Madhav Purohit answered
        0
        Hima Mehta (anonymous)

        its c

        Hima Mehta answered
          0
          Madhav Purohit (anonymous)

          Hima Mehta: How cn u say…

          Madhav Purohit answered
            0
            Hima Mehta (anonymous)

            its the overflow condition … xor of carry bit and sign bit is 1 ..

            Hima Mehta answered
              Add image to editor add image from link

              Question stats

              • Active
              • Views694 times
              • Answers9 answers
              • Followers1 follower
              Question and answer is powered by AnsPress