3. Consider an instruction Add 1000. Memory contents, Accumulator (AC), and R1 R
ID: 3780451 • Letter: 3
Question
3. Consider an instruction Add 1000. Memory contents, Accumulator (AC), and R1 Register contents are depicted in the below figure: (such as memory address 1000 contains a value 1400, memory address 1100 contains a value 400 etc. All the numbers used here are decimals). [6 marks] Assuming R1 is implied in the indexed addressing mode, determine the actual value loaded into the accumulator (AC) using the following addressing modes: i) Immediate ii) Direct iii) Indirect iv) Indexed
Memory 1000 1400 1100 400 1200 1000 1300 1100 1100 1300 RI 200 AC 500Explanation / Answer
i) for immediate AC <- AC+content of R1 (1200)
AC = 500 + 1000 = 1500
ii) for Direct addressing : content of address 1000 -> 1400
Accumelator AC <- AC+1400 = 500+1400
AC = 1900
iii) indirect addressing
Content of address 1000 is 1400 . In indirect addressing , content of address 1400 is 1300, so it will added to AC
AC<-AC+ 1300 = 500 + 1300
AC = 1800
iv) AC<- AC+content of address 1200
AC = 500+1000 = 1500
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.