retagged by
35,892 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

839
views
0 answers
0 votes
srestha asked Apr 2, 2019
839 views
Register $R_{1}$ and $R_{2}$ of a computer contain the decimal values $1200$ and $4600$ . What is the effective address of the memory operand in each of the following ... $Subtract$ $\left ( R_{1} \right )+,R_{5}$ Ans-1200//Autoincrement
1.3k
views
1 answers
0 votes
BASANT KUMAR asked Jun 4, 2018
1,336 views
Quantify the effect on performance that result from the use of a cache in the case of a program that has a total of $500$ instruction including a $100$ instruction loop ... $25$ times so why there is multiplication of $24$ ??why not $25$??
578
views
0 answers
0 votes
cynicthnkr asked Apr 6, 2018
578 views
1. Computer Organization and Embedded Systems 6e Paperback – 1 Jul 2017 2. Computer Organization Paperback 5e – 4 Nov 2011Are these two same, because titles are different, if not which one is recommended for gate preparation? Please help.
3.7k
views
1 answers
3 votes
Rishabh Gupta 2 asked Oct 18, 2017
3,705 views
Problem: A computer system uses 32-bit memory addresses and it has a main memory consisting of 1G bytes. It has a 4K-byte cache organized in the block-set- ... they are being replaced. Please keep it simple, it's very confusing for me.