## Invitation to Computer Science 8th Edition

Assuming that variables $a, b, c,$ and $d$ are stored in memory locations $100,$ $101,102,$ and $103,$ respectively: $\begin{array}{llll} {\text {Memory}} & {\text {} } & {\text {Address} } & {\text {} }\\ {\text {Location }} & {\text {Op Code} } & {\text {Field} } & {\text {Comment} }\\ {50} & {\text { LOAD }} & {101} & {\text { Register } R \text { now contains the value of } b} \\ {51} & {\text { ADD }} & {102} & {R \text { now contains the sum } b+c} \\ {52} & {\text { ADD }} & {103} & {R \text { now contains the sum } b+c+d} \\ {53} & {\text { STORE }} & {100} & {\text { And we store that sum into } a}\end{array}$ There are many other possible solutions to the previous and the following problems, depending on which instructions you choose to use. The previous solution uses the one-address format. The two- and three-address formats would lead to different sequences.
Assuming that variables $a, b, c,$ and $d$ are stored in memory locations $100,$ $101,102,$ and $103,$ respectively: $\begin{array}{llll} {\text {Memory}} & {\text {} } & {\text {Address} } & {\text {} }\\ {\text {Location }} & {\text {Op Code} } & {\text {Field} } & {\text {Comment} }\\ {50} & {\text { LOAD }} & {101} & {\text { Register } R \text { now contains the value of } b} \\ {51} & {\text { ADD }} & {102} & {R \text { now contains the sum } b+c} \\ {52} & {\text { ADD }} & {103} & {R \text { now contains the sum } b+c+d} \\ {53} & {\text { STORE }} & {100} & {\text { And we store that sum into } a}\end{array}$ There are many other possible solutions to the previous and the following problems, depending on which instructions you choose to use. The previous solution uses the one-address format. The two- and three-address formats would lead to different sequences.