1 / 21

Introduction to Computing Systems (3rd Exam)

Introduction to Computing Systems (3rd Exam). [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. [5] Suppose R3 contains an integer x. Please write an instruction which puts x-1 in R3.

lev-levine
Download Presentation

Introduction to Computing Systems (3rd Exam)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Computing Systems (3rd Exam)

  2. [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. [5] Suppose R3 contains an integer x. Please write an instruction which puts x-1 in R3. 0001011011111111

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

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

  6. [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. [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. [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. [5] What does the following instruction do? 0001101101100001. R5 R5 + 1

  11. [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. [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

More Related