Computer System Architecture - Central Processing Unit

Consider the following program segment. Here R1, R2 and R3 are the general purpose registers.
Assume that the content of memory location 3000 is 10 and the content of the register R3 is 2000. The content of each of the memory locations from 2000 to 2010 is 100. The program is loaded from the memory location 1000. All the numbers are in decimal.

21. Assume that the memory is word addressable. After the execution of this program, the content of memory location 2010 is

  • Option : A
  • Explanation : The given program stores results from memory location 2000 to 2009.
    It stores values like 110,109,108.....100.
    No change at location 2010 So at 2010 value is 100
Cancel reply
Cancel reply

Consider the following program segment. Here R1, R2 and R3 are the general purpose registers.
Assume that the content of memory location 3000 is 10 and the content of the register R3 is 2000. The content of each of the memory locations from 2000 to 2010 is 100. The program is loaded from the memory location 1000. All the numbers are in decimal.

23. 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
Cancel reply