in CO and Architecture
237 views
1 vote
1 vote

I have seen lots of questions like this :
A load-store architecture in which memory operation applied only on LOAD and STORE instructions and other all operations are REG-REG instructions. Assume three address architecture. Find the minimum number of instructions required to execute the expression $X =\frac{(A+B) - (C+D)}{E}$ in this load store architecture, where A, B, C, D, E and X are memory locations and expression evaluated on operands stored in these locations. Result stores in memory location X.

Some practice questions like these: 

  1. $X=(A+B)*(C+D) $
    3AI: 3
    2AI:6
    1AI:7
    0AI:8
  2. $X=A*B+C*C$
    3AI: 3
    2AI:6
    1AI:7
    0AI:8
  3. $X=\frac{A-B}{C+D*E} $
    3AI: 4
    2AI:7
    1AI:8
    0AI:10
  4.  $X=\frac{A-B+C*(D*E-F)}{G+H*K}$
    3AI: 8
    2AI:12
    1AI:16
    0AI:18
  5.  $X=\frac{A+B*C}{D-E*F+G*H}$
    3AI: 7
    2AI:12
    1AI:15
    0AI:16

    Please comment if anything wrong!!!
in CO and Architecture
237 views

Please log in or register to answer this question.

Related questions