[A+(B*C)]^{2} + (B*C)

Dark Mode

go_editor
asked
in CO and Architecture
Dec 19, 2016
recategorized
Apr 16, 2021
by Lakshman Patel RJIT

1,222 views
19 votes

$LOAD\ B : ACC \leftarrow M[B]: ACC=B$

$MULT\ C: ACC \leftarrow ACC\times M[C]:ACC=BC$

$STORE\ T1 :M[T1] \leftarrow ACC: M[T1]=BC$

$ADD\ A : ACC \leftarrow ACC+M[A]: ACC=BC+A$

$STORE\ T2 :M[T2] \leftarrow ACC: M[T2]=BC+A$

$MULT\ T2: ACC \leftarrow ACC\times M[T2]:ACC=(BC+A)^2$

$ADD\ T1 : ACC \leftarrow ACC+M[T1]:ACC=(BC+A)^2+BC$

$STORE\ Z: M[Z] \leftarrow ACC:M[Z]=(BC+A)^2+BC$

$Z=(BC+A)^2+BC$

0 votes

ACC <- B

ACC <- C * ACC

M[T1] <- ACC // T1= B*C

ACC<- A+ ACC

M[T2] <- ACC // T2 = A+ (B+C)

ACC <- T2 * ACC

ACC <- T1+ ACC

Z<- ACC // Z=$[A+(B*C)]^{2}$+ (B+C)

ACC <- C * ACC

M[T1] <- ACC // T1= B*C

ACC<- A+ ACC

M[T2] <- ACC // T2 = A+ (B+C)

ACC <- T2 * ACC

ACC <- T1+ ACC

Z<- ACC // Z=$[A+(B*C)]^{2}$+ (B+C)

@Scion_of_fire this answer is wrong . At the 4^{th} step you are doing BC+A then how come at 5^{th} step it is becoming A+(B+C) !!!.

@Arjun Sir Please flag this answer.

0