Question: 12. Assume memory address M[1] contains the value 2, address M[2] contains the value 4. and address M[3) contains the value 6. What are the

12. Assume memory address M[1] contains the value 2, address M[2] contains the value 4. and address M[3) contains the value 6. What are the values of all three addresses after the following assembly instructions are executed? SUB M(3) M[2] M[1] works how you might expect (.e., similar to ADD M[3] M[2] M[1]) (1 point) ADD M[1] M[2] M[1] SUB M[3] M[3] M[1] ADD M[1] M[1] M[1] SUB M[1] M[2] M[3] ADD M[3] M[3] M[2] SUB M[2] M[2] M[3] 13. Suppose a, b, c, and d are in memory locations M[100]. M[101], M[110], and M[111), respectively. Write an algebraic equation that represents the following assembly language instructions: (1 point) ADD M[100] M[100] M[100] ADD M[100] M[100] M[109] ADD M[111] M[111] M[111] ADD M[110] M[188] M[111] ADD M[110] M[110] M[101] 14. Assume the variables v, w, x, y, and z are stored in memory locations M[001], M[010]. M[011], M[100], and M[101], respectively. Using the machine language instructions shown in Section 4.2, fill in the blanks to translate the following algorithmic operations into their machine language equivalents. You can overwrite a memory location for an intermediate calculation, if that location is no longer needed. See zyBooks activities 4.2.2 and 4.2.3 for examples. (2 points) a. Set v to the value of (w + x) + (y +z) 1 1 @ 10 1 1 1 @ @ 1 1 @ @ 1 @ @ @ @ @ @ @ @ b. Input v from the user, then display v2 @ @ @ @ @ @ 1 1 - - - - - 1 @ @ 1 - 1 1 - @ @ @ @ @ @ @ @ @
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
