retagged by
33,672 views
5 votes
5 votes
Registers R1 and R2 of a computer contain the decimal values 1200 and 4600.What is the Effective
address of the memory operand in each of the following instructions?
a) Load 20(R1),R5
b) Move #3000,R5
c) Store R5,30(R1,R2)
d) Add -(R2),R5
e) Subtract (R1)+,R5
retagged by

1 Answer

Best answer
4 votes
4 votes

Registers R1 and R2 of a computer contain the decimal values 1200 and 4600, we have to find effective adress of associated memory operand in each instruction:

 Load 20(R1),R5 : This means load 20+R1 into R5 .   R1= 1200 , R1 + 20 = 1220 , so R5 have 1220 , Effective address of R5 is 1220.

 Move #3000,R5 : This means move value 3000 into R5 , so effective address is part of the instruction whose value is 3000.

Now R5 = 3000

 Store R5,30(R1,R2) : This means 30+R1+R2 and store the result into R5 .

so R5 = 30+1200+4600 =  5830 , so now R5 value is 5830 , the effective address is 5830.

 Add -(R2),R5 : This means -1 from  R2 value and store the result into R5 . So R5= 4600 - 1 = 4599 , effective address of R5 is 4599 .  It is pre decrement addressing.

 Subtract (R1)+,R5 : This means effective address is contents of R1 so EA = 1200 .

It is post increment addressing .

Effective addresses are

  1. 1220
  2. 3000 [ it is not the effective address , it is the address of the instruction part where 3000 is stored ] 
  3. 5830
  4. 4599
  5. 1200
edited by

Related questions

0 votes
0 votes
0 answers
3