Central Processing Unit Q.23

0. A processor that has carry, overflow and sign flag bits as part of its program status word (PSW) performs addition of the following two 2’s complement numbers 01001101 and 11101001. After the execution of this addition operation the status of the carry, overflow and sign flags, respectively will be :

  • Option : B
  • Explanation : 100110110 (in 2's complement ignore carry bit so ignore 1 at msb)
    After carry bit is ignored the value at msb is 0 means number is positive so sign bit is 0.
    Overflow flag is set only if the X-OR between the carry-into the sign bit and carry -out of the sign bit is 1.
    Therefore,
    carry flag = 1,
    overflow flag = 0,
    sign bit = 0
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 *