GATE Computer ScienceModerateGATE CS (PYQ pattern)
A three-word memory-to-memory instruction ADD @A, B (opcode word, address word A, address word B) computes M[B] ← M[M[A]] + M[B], where @A is memory-indirect. Instructions and data are fetched one word per memory reference and there is no cache. How many memory references does one execution make?
- A. 7
- B. 6
- C. 5
- D. 8
Correct answer: A. 7
Fetch 3 instruction words (3); read the pointer M[A] (1); read the operand M[M[A]] (1); read M[B] (1); write the sum back to M[B] (1): 7. Forgetting the write-back gives 6; treating the instruction as a single fetch gives 5.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A quad-core chip gives each core a 32 KB L1 instruction cache, a 32 KB L1 data cache and a 256 KB private L2; all cores share an 8 MB L3…
- Two packed-BCD bytes 0x47 and 0x38 are added with a binary adder. Which correction is needed and what is the correct BCD result?
- A 4-way set uses tree pseudo-LRU with three bits: the root bit says which pair (ways 0-1 or 2-3) holds the next victim, and each pair bit…
- A program spends 70% of its time computing and 30% stalled on cache misses. A bigger cache cuts the stall time by 40% but lengthens the…
- A 4-way set holds blocks A, B, C, D in ways 0, 1, 2, 3; A is the least and D the most recently used. Tree pseudo-LRU uses three bits, all…
- A 16-bit unsigned integer (0..65535) is multiplied by a 16-bit two's-complement integer (−32768..32767). What is the minimum width of a…