Soal :
Z = (X2 +y)3
– k/(L*M3)
Buatlah Persamaan diatas menjadi :
- Triples Notation
- Indirect Triples
- Quadruples Notation
- Kode antara Assembly Accumulator
Jawaban :
Triple Notation
1.
+,x2,y
2.
*,
1,1
3.
*,
M, M
4.
*,
M,3
5.
*,
L,4
6.
/,K,
5
7.
-,3,6
8.
=,Z,7
Quadrupel Notation
1.
+,
x2,y,T1
2.
*,T1,T1,T2
3.
*,M,M,T3
4.
*,T3,M,T4
5.
*,L,T4,T5
6.
/,K,T5,T6
7.
-,T2,T6,Z
Assembly Accumulator
1.
LDA
x2
ADD y
STO T1
2.
LDA
T1
MUI T1
STO T2
3.
LDA
M
MUI M
STO T3
4.
LDA
T3
MUL M
STO T4
5.
LDA
K
MUL T4