Introduction to Computing Systems (3rd Exam)
1.[5] Suppose R1 contains an integer x and R2 contains another integer y. Please write an instruction which puts x+y in R or
2.[5] Suppose R3 contains an integer x. Please write an instruction which puts x-1 in R
3.[5] Please write an instruction which puts zero in R XXX100000
4.[5] Suppose R5 contains xFFFF. Please write an instruction to change the contents of R5 to xFFF or
5.[5] Suppose there is an integer x stored at memory location x30F6. We want to read x into R4 by executing an instruction placed at memory location x30E6. What is this instruction?
6.[5] Suppose there is an instruction placed at memory location x413E. After the instruction is executed, the PC is loaded with x4120 if the condition code Z = 1. What is the instruction located at x413E?
7.[5] Suppose R2 contains xAFAF. We want R2 to contain x5050 after an instruction is executed. What is the instruction?
8.[5] Suppose there is an instruction placed at x30F8. After the instruction is executed, the contents of R2 will be stored at memory location x30F4. What is the instruction located at x30F8?
9.[5] What does the following instruction do? R5 R5 + 1
10.[5] What does the following instruction do? R7 0
11.[5] What happens if the following instruction, located at x507B, is executed? Jump to x5001 or PC is loaded with x5001
12.[5] What happens if the following instruction, located at x7679, is executed? PC is loaded with x767A or the next instruction to be executed is at x767A
13.[5] What does the following instruction do? R2 (R6)’
14.[5] Suppose xABAB, xCDCD, xEFEF are stored at memory locations x3FC7, x3FC8, and x3FC9, respectively. If the instruction is located at x4019, what will the contents of R3 be after the execution of this instruction? R3 xCDCD
15.[5] If memory location x4018 contains the following instruction: What will the contents of R6 be after the execution of this instruction? R6 x4016
16.[5] Suppose the instruction is in x4A1B, the contents of x49E8 is x1120,and the contents of x1120 is x7654. What will the content of R3 be after the execution of this instruction? R3 x7654
17.[5] Suppose R1 contains xF0F0 and R2 contains x2345. What will the contents of x2362 be after the execution of the following instruction? [x2362] xF0F0
18.[5] Suppose R2 contains xABCD. What will R2 contain after the execution of the following instruction? R2 x5432
19.[5] Please write an instruction to move the value in R2 into R
20.[5] What happens if the following instruction is executed? Will execute this instruction forever