2 votes 2 votes How many memory refernces are required for fetching and executing each of the following instructions? (a)ADD 50(R1),R2 b)SUB (R1)+R2 CO and Architecture co-and-architecture + – rahuldb asked Nov 10, 2016 • retagged Nov 13, 2017 by Arjun rahuldb 3.6k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 3 votes 3 votes 1). 1 instruction fetch, 1 fetching from indexed location and 1 to store into indexed location Total 3 memory references . 2 ). 1 instruction fetch, 1 fetching from indirect location and 1 to store into indirect location Total 3 memory references . Prashant. answered Nov 11, 2016 • selected Jan 7, 2017 by Kapil Prashant. comment Share Follow See all 2 Comments See all 2 2 Comments reply Arjun commented Nov 11, 2016 reply Follow Share Register access is a memory access? And what about instruction fetch - the question explicitly says this though it does not give instruction size. 0 votes 0 votes Prashant. commented Nov 12, 2016 reply Follow Share sir plz provide link about that topic . 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes (a)ADD 50(R1),R2 one for accessing R2, one for acessing R1 and then adding 50+(R1) ---1 for execution and then again accessing 50+(R1)...so total 3fetches + 1 execution b)SUB (R1)+R2 one for accessing R2, one for acessing R1 and then again accessing (R1)...so total 3 fetches + 0 executes considering (R1) as register indirect mode Pavan Kumar Munnam answered Nov 11, 2016 Pavan Kumar Munnam comment Share Follow See all 2 Comments See all 2 2 Comments reply Arjun commented Nov 11, 2016 reply Follow Share aren't R1 and R2 registers? What about instruction fetch? 0 votes 0 votes Pavan Kumar Munnam commented Nov 11, 2016 reply Follow Share Yes I am wrong . . . I have considered number of references for calculation of addresses . . . I did not see the ques properly I thought just references 1 votes 1 votes Please log in or register to add a comment.