Computer architecture.(MIPS) - Adressing modes How do you compute the effective
ID: 3905656 • Letter: C
Question
Computer architecture.(MIPS) - Adressing modes
How do you compute the effective address for immediate adressing, Direct addressing, indirect addressing, register adressing, Register indirect addressing, and displacement addressing. Provide general formulas. Below is a problem.
D 343 Compute × / 9 Hr w k1SP18?D 351Wegne x-D Hmk1SP18 ? D 351 Wagner x-D slide 1 W Address ng x-y x-eChegg Study -? X Address gr X C proto.cs.qc.cuny.edu/cs343/Hmwk1SP18.pdf ADDRESSING MODES Consider an instruction. The address field of the instruction contains the value 2000. When needed, register #18 is used. Register 18 contains value 1600 The list below shows a few addresses and the memory content of each of these addresses. Address (bytes) 48 Memory Content 844 For each of the Addressing Modes, specify the Effective (Target) Address and value found at that address. For each case a brief explanation Addressing Modes Effective Address (bytes Value DIREC EGISTER INDIRECT EME 8:24 PM 6/17/2018Explanation / Answer
Let us calculate effective address and value for the given instruction for following
addressing modes:
IMMEDIATE: In immediate addressing mode operand is specified in the instruction. So no need to
think about effective address and here the value is 2000 (mentioned in instruction).
DIRECT: In direct addressing mode address field of instruction contains address of instruction.
i.e. Effective address= address field of instruction. Here in address field 2000 is given, so effective address=2000. ant the valu is containts at location 2000. i.e. 3000.
INDIRECT: In indicect addressing mode address field of instruction contains address of operand.
i.e. Effective address= contains of address field.
Here in address field we have 2000, and at 2000 we have 3000. So effective address is 3000. Value is containts of 3000. i.e. 1200.
REGISTER: In register addressing mode operand is in the register mentioned in adress field of instruction. Here
we have register #18 is in address field, So here no need of effective address and the value is containt of #18. i.e. 1600.
REGISTER INDIRECT: In register indicrect addressing mode the register specified in instruction contains address of operand. So register containt is effective address. Here ni register #18 we have 1600, at memory location 1600 we have 400. So effective address is 1600 and value is 400.
DISPLACMENT: In displacment addressing mode containts of register in instruction is added to address field mentioned in instruction to find effective address. Here we have register #18 contains1600, and the memory location mentioned in instruction is 2000. So effective address=1600+2000=3600. The value is containts at 3600. i.e. 500.
All the above calculations are summarized in following table:
Addressingmode
Addressingmode
Effecitive address Value Immediate ---- 2000 Direct 2000 3000 Indirect 3000 1200 Register --- 1600 Register Indirect 1600 400 Displacment 3600 500Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.