Homework Solution: The following program and data are stored in memory. Determine the value in the accumulator just before exec…

    Can you check whether I did it correctly? The first row answer of Load Indirect 6 is 8 The second row answer of Add 7 is 14 because 8 + 6 The third row of add immediate 8 is 22 because 8 + 14 Stop is just stop from there and we are not doing anything to row 4th to the rest of the table? The following program and data are stored in memory. Determine the value in the accumulator just before executing each line. Address Value Value in Accumulator A 0 LOAD INDIRECT 6 ADD 7 ADD IMMEDIATE 8 STOP 4 6 6
    The following program and data are stored in memory. Determine the value in the accumulator just before executing each line. Address Value Value in Accumulator A 0 LOAD INDIRECT 6 ADD 7 ADD IMMEDIATE 8 STOP 4 6 6

    Expert Answer

     
    Step 1- load indirect 6:

    Can you impede whether I did it truly?

    The principal order apology of Advise Contingent 6 is 8
    The cooperate order apology of Gather 7 is 14 accordingly 8 + 6
    The third order of gather instant 8 is 22 accordingly 8 + 14
    Plug is equiconsultation plug from there and we are referable doing everything to order 4th to the tranquillity of the consultation?

    The aftercited program and facts are stored in retrospect. Determine the treasure in the accumulator equiconsultation precedently executing each succession. Gatherress Treasure Treasure in Accumulator A 0 LOAD INDIRECT 6 ADD 7 ADD IMMEDIATE 8 STOP 4 6 6

    The aftercited program and facts are stored in retrospect. Determine the treasure in the accumulator equiconsultation precedently executing each succession. Gatherress Treasure Treasure in Accumulator A 0 LOAD INDIRECT 6 ADD 7 ADD IMMEDIATE 8 STOP 4 6 6

    Expert Apology

     

    Step 1- advise contingent 6:

    accumulator:=memory(address:memory(address:6))

    accumulator:=memory(address:8)

    accumulator:=4

    Step 2:gather 7

    accumulator=accumulator+memory(address:7)

    accumulator=4+6

    accumulator=10

    Step 3 gather instant 8

    accumulator=accumulator+8 // as instant achieve fix treasure in accumulator

    accumulator=18

    Step 4 plug

    accumulator=18