title: Micro-operations on an EXECUTE cycle of an instruction
body: <p>Here is the instruction: <strong>MAC #NUM, (R0)+, R1</strong> which translates to the following: </p>
  
  <p><strong>MAC source1, source2, source3/destination</strong>, </p>
  
  <p>in other words, it does the following:</p>
  
  <p><strong>source3/destination &lt;--- (source1 x source 2) + source3/destination</strong>. </p>
  
  <p>This instruction is to be executed on a single-bus cpu internal organization:</p>
  
  <p><img src="https://i.stack.imgur.com/asQEB.png" alt="Single-bus CPU organization"></p>
  
  <p>The question asks to give the sequence of control steps to execute this instruction (only the execute phase).</p>
  
  <p>The solution that was given was </p>
  
  <pre><code>T3: load TEMP with immediate data #NUM 
      BUS &lt;- IR(immediate data field), TEMP &lt;- Bus
  
  T4: get the operand pointed to by R0 from memory into MDR and increment value of R0:
  
      Bus &lt;- R0, MDR &lt;- BUS, Sel_temp = 1, F =ADD, result &lt;- alu output
  
  T5: READ, MDR &lt;- data_out_of_memory, BUS &lt;- result, R0 &lt;- Bus
  
  T6: perform the multiply of #NUM X MEM(R0)
      Bus &lt;- MDR, sel_temp = 0, F = multiply, result &lt;- alu out
  
  T7: save result of multiplication into the TEMP 
  
      BUS &lt;- Result, TEMP &lt;- Result
  
  T8: add R1 to TEMP
      BUS &lt;- R1, F = ADD, sel_temp = 0, result &lt;- alu output
  
  T9: store final result back into R1
  
      Bus &lt;= Result, R1 &lt;- Bus, END.
  </code></pre>
  
  <p>My question is, why is it that they're throwing <code>R0</code> register in the <code>MDR</code> instead of the <code>MAR</code>? Don't you need to put something in the MAR if you're planning on retrieving data from the memory at <code>T5</code>?</p>