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:
- $X=(A+B)*(C+D) $
3AI: 3
2AI:6
1AI:7
0AI:8
- $X=A*B+C*C$
3AI: 3
2AI:6
1AI:7
0AI:8
- $X=\frac{A-B}{C+D*E} $
3AI: 4
2AI:7
1AI:8
0AI:10
- $X=\frac{A-B+C*(D*E-F)}{G+H*K}$
3AI: 8
2AI:12
1AI:16
0AI:18
- $X=\frac{A+B*C}{D-E*F+G*H}$
3AI: 7
2AI:12
1AI:15
0AI:16
Please comment if anything wrong!!!