Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Introduction to Computing Systems (3rd Exam)

2 1.[5] Suppose R1 contains an integer x and R2 contains another integer y. Please write an instruction which puts x+y in R3. 0001011001000010 or 0001011010000001

3 2.[5] Suppose R3 contains an integer x. Please write an instruction which puts x-1 in R3. 0001011011111111

4 3.[5] Please write an instruction which puts zero in R6. 0101110XXX100000

5 4.[5] Suppose R5 contains xFFFF. Please write an instruction to change the contents of R5 to xFFF0. 0101101101110000 or 0001101101110001

6 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? 0010100000001111

7 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? 0000010111100001

8 7.[5] Suppose R2 contains xAFAF. We want R2 to contain x5050 after an instruction is executed. What is the instruction? 1001010010111111

9 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? 0011010111111011

10 9.[5] What does the following instruction do? 0001101101100001. R5 R5 + 1

11 10.[5] What does the following instruction do? 0101111111100000 R7 0

12 11.[5] What happens if the following instruction, 0000111110000101 located at x507B, is executed? Jump to x5001 or PC is loaded with x5001

13 12.[5] What happens if the following instruction, 0000000010000100 located at x7679, is executed? PC is loaded with x767A or the next instruction to be executed is at x767A

14 13.[5] What does the following instruction do? 1001010110111111. R2 (R6)’

15 14.[5] Suppose xABAB, xCDCD, xEFEF are stored at memory locations x3FC7, x3FC8, and x3FC9, respectively. If the instruction 0010011110101110 is located at x4019, what will the contents of R3 be after the execution of this instruction? R3 xCDCD

16 15.[5] If memory location x4018 contains the following instruction: 1110110111111101. What will the contents of R6 be after the execution of this instruction? R6 x4016

17 16.[5] Suppose the instruction 1010011111001100 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

18 17.[5] Suppose R1 contains xF0F0 and R2 contains x2345. What will the contents of x2362 be after the execution of the following instruction? 0111001010011101. [x2362] xF0F0

19 18.[5] Suppose R2 contains xABCD. What will R2 contain after the execution of the following instruction? 1001010010111111. R2 x5432

20 19.[5] Please write an instruction to move the value in R2 into R6. 0001110010100000

21 20.[5] What happens if the following instruction is executed? 0000111111111111. Will execute this instruction forever


Download ppt "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."

Similar presentations


Ads by Google