1,193 views
1 votes
1 votes

1 Answer

Best answer
4 votes
4 votes

Expression- $XY + XYZ +YZ$
Initially,
$X$ is in $R_0$,
$Y$ is in $R_1$,
$Z$ is in $R_2$.

$MUL \ \ R_0, \ R_1, \  R_4​​​​$    // 1 clock cycle   (XY)
$MUL \ \ R_1, \ R_2, \  R_5​​​$    // 1 clock cycle   (YZ)
$MUL \ \ R_4, \ R_2, \  R_6​​​$    // 1 clock cycle   (XYZ)
$ADD \ \ R_4, \ R_5, \  \color{Red}{R_7}$    // 2 clock cycle   (XY + YZ)
$ADD \ \ \color{Red}{R_7} \ R_6, \  R_8$     // 1 clock cycle   (XY + XYZ + YZ)

Total 6 clock cycles.

edited by

Related questions

396
views
2 answers
0 votes
lea asked Jun 12, 2023
396 views
676
views
0 answers
0 votes
Chaitanya Kale asked Feb 13, 2023
676 views
Consider 3-word long jump instruction designed with PC-relative addressing mode, stored in the memory with a starting address of (2000)$_{10}$. Address field of an ... we assign it to PC?PC should be 2003 at the end of execution right?
1.0k
views
1 answers
1 votes
newbie asked Jan 7, 2019
1,030 views
If someone mentioned "index value" in indexed addressing mode then which value is it referring; the value of index register or the constant value? ... the given snippet it seems that they are referring constant valuePlease clarifyThank You
856
views
1 answers
1 votes
Gurdeep Saini asked Jan 4, 2019
856 views
I know about indirect addressing mode , Index addressing modebut do not know about Indirect index addressing mode ?in one solution of a question they ... address i did not found it on google etcexplain Indirect index addressing mode