6. These are the status of the memory and processor registers: Register r0 rl r2
ID: 2248884 • Letter: 6
Question
6. These are the status of the memory and processor registers: Register r0 rl r2 r3 content 00010010 00010110 00010011 00010000 Memory address 00010000 00010001 00010010 00010011 00010100 00010101 00010110 Memory content 01010011 00101101 00010101 00101010 11011101 00000010 What is the value of the registers and memory after each instruction, (each instruction will run individually on the memory and register) a. ADD (r0), (r1),r2 SUB (r1), r2, r3 ADD (r3), rl, (r3) b. Considering the memory and register in its original status before section “a" find out what changes will happen to memory and register at the end of the following program LD ADD ST r0, 2(r2) rl, r0, r2 3(r3), rlExplanation / Answer
ADD (r0), (r1), r2
The memory location stored in r0 will be updated by addition of r2 value and value stored in location posted by r1
That is location 00010110 will have
11111111+00010011 = 00010010
SUB (r1), r2, r3
00010011-00010000
00000011
ADD (r3), r1, (r3)
Result of 01010011+00010110 = 01101001
Is stored in location 00010000
b)
LD r0, 2(r2)
Load r0 with value 00000010
ADD r1, r0, r2
r1 will store value 0100101 after r0+r2
ST 3(r3),r1
00010110 will be stored in memory location 00100101
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.