Professional Documents
Culture Documents
bc190201210 Assignment 1 CS501
bc190201210 Assignment 1 CS501
y = a3 – b3 – 3ab
Note: a, b, and c represent memory locations.
Solution No.1:
Instruction Type ra rb rc c1 c2 c3
sub R6, R3, R2
str R8, 34
ld R2, 64
stop
shc R3, R4, 3
not R2, R5
Solution No.2:
Instructio Typ ra rb rc c1 c2 c3
n e
sub R6, R3, D R6 R3 R2
- - -
R2
str R8, 34 C R8 34
- - - -
ld R2, 64 C R2 64
- - - -
stop A
- - - - - -
shc R3, R4, 3 D R3 R4 3
- - -
not R2, R5 D R2 R5
- - - -