COMP SCI 252 Midterm: CS 252 UW Madison Spring2013 Exam3A SOL

28 views8 pages
31 Jan 2019
Professor

Document Summary

Prof. mark d. hill and prof. gurindar sohi. Tas: mona jalal, rebecca lam, preeti agarwal, pradip vallathol. No: book(s), note(s), or calculators of any sort. Plan your time carefully since some problems are longer than others. The lc-3 instruction set is provided to you on the last page. For the following questions, select the best answer. Apart from incrementing the pc in the fetch stage of an instruction cycle, the processing of which of the following instructions does not perform an addition: and, str, add, ldr, all of the above. Give the contents of the following registers after instruction 1 (at address 0x3014) has executed but before the fetch phase of instruction 2 (at address 0x3015) has started. We are about to execute the following code snippet. 0x2000 and that the value at memory address 0x30a0 = 0x2000. Lc-3 machine instructions so that each instruction stores the value in r2 at the destination address specified in the rightmost column.