341_Homework_2.pdf - CECS 341 Computer Architecture 2018 R...

This preview shows page 1 - 2 out of 2 pages.

CECS 341 Computer Architecture © 2018 R. W. Allison Homework 2 Page 1 Homework #2 Name _____________________________ SID _____________________________ Using this sheet as the cover sheet, submit solutions for these problems on separate sheets of paper, clearly showing all your work. 1. A two-word instruction is stored at location 0x03C7 with its address field at location 0x03C8 (i.e. trailing word). The address field has a value of 0x8211. A processor register R1 contains the value 0x018A. Calculate the effective address (EA) if the addressing mode of the instruction is (a) direct; (b) immediate; (c) PC relative; (d) register indirect; (e) indexed with R1 as the index register. Show your work and the 16-bit hexadecimal result of the EA calculation. 2. How many times will a CPU have to reference memory in order to fetch and execute a two-word indirect addressing mode instruction (a) if the instruction is an ADD instruction requiring one operand from the memory location referenced by the indirect addressing-mode and the other operand from a CPU register, returning the result of the ADD back to the memory location (i.e. a “read -modify- write” type instruction)? How many times will the CPU have to reference memory in order to fetch and execute a two-word indirect addressing mode instruction (b) if the instruction is a JMP instruction?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture