Who can help me solve them and explain? Problem 1 Topic: Memory Addressing Regis
ID: 3890772 • Letter: W
Question
Who can help me solve them and explain?
Problem 1 Topic: Memory Addressing Registers R2 and R3 contain the decimal values 350 and 1500 respectively before each of the following addressing modes is used to access a memory operand. What is the Effective Address (EA) in decimal in each of the following cases? Remember, R2 and R3 contain 350 and 1500 before each sub-question. (Hint: Refer to table 2.1 on page 41) a) 24(R3) b) (R3,R2) c) (R2)+ d) +(R3) e) 0x712 Problem 2 Topic: Assembly Give the value (in hexadecimal) of R2 after each of the following sets of instructions: addi R2, RO, 0x6D andi R2, R2, OxAA ori R2, R2, 0xF subi R2, R2, 0xl R2 = addi R2, RO, 0x1A slli R2, R2, 0xF subi R2, R2, 0x6 oriR2, R2, 0xD b) R2 = or R2, RO, 0xAB andi R2, R2, 0x55 c) slli R2, R2, 0x1 R2 =Explanation / Answer
1. Operand = 24(R3)
Effective address = 1524
Explanation : This is register indirect addressing mode. Effective address = Value in R3 + displacement i.e., 24 + 1500 = 1524
2. Operand = (R3,R2)
Effective address = 1850
Explanation = This is also register indirect addressing mode. Effective address = Total of values in the registers i.e., 1500+ 350 = 1850
3. Operand: (R2)+
Effective address = 350
Explanation: This is post increment notation. I.e., after the instruction is executed the value of R2 is incremented by word length of the processor (generally 4 or 8 bytes). So the effective address of the is 350.
4. Operand: +(R3)
Effective address = 1501
Explanation: This is pre increment notation. I.e., the value in the R3 is incremented before the execution of instruction. Here I assumed that the word length of the processor is 1 byte. So the effective address is R3+ 1 = 1501.
5. Operand: 0x712.
Effective address: 1810.
Explanation: This is immediate addressing mode. And the address is in hexadecimal format (0x indicates the value is in hexadecimal format. The decimal value for 712 is 1801.
Please Rate it if you find the answer is helpful.....Thanks....:)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.