Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Computing Systems (4th Exam). 1.[10] Please convert each machine language instruction to its assembly language counterpart. –0101001001100000.

Similar presentations


Presentation on theme: "Introduction to Computing Systems (4th Exam). 1.[10] Please convert each machine language instruction to its assembly language counterpart. –0101001001100000."— Presentation transcript:

1 Introduction to Computing Systems (4th Exam)

2 1.[10] Please convert each machine language instruction to its assembly language counterpart. –0101001001100000 –0001101101111111 –1001111111111111 –0001100001000100 –1111000000100101 AND R1,R1,#0 ADD R5,R5,#-1 NOT R7,R7 ADD R4,R1,R4 HALT

3 2.[10] Please convert each machine language instruction to its assembly language counterpart. –ADD R1, R1, R0 –AND R3, R3, #5 –NOT R1, R4 –ADD R5, R5, #-3 –.FILL xFF00 0001 0010 0100 0000 0101 0110 1110 0101 1001 0011 0011 1111 0001 1011 0111 1101 1111 1111 0000 0000

4 3.[20] Consider the following program: x30051110010000000111 x30060101000000100000 x30070110100010000000 x30080001100100111110 x30090000100000000010 x300A0001000000100011 x300B0000111111111100 x300C1111000000100101 x300D0000000000001111 (a) Explain what the program does. (b) What will the value be contained in R0 when the program is executed? (a) Perform (b) 21

5 4.[20] Consider the following program: x40000010000000001000 x40010010001000000110 x40020000110000000011 x40030001000000000000 x40040001001001111111 x40050000111111111100 x40060011000000000011 x40071111000000100101 x40080000000000000101 x40090000000000000011 x400A (a) Explain what the program does. (b) What will the value be contained in the address x400A when the program is executed? (a) Shift x0003 left 5 times (b) 96 or x0060

6 5.[20] Consider the following program:.ORIG 5000 AND R2, R2, #0 LD R0, DATA1 NOT R0, R0 ADD R0, R0, #1 LD R1, DATA2 AGAIN ADD R2, R2, #1 ADD R1, R0, R1 BRzp AGAIN FINISH ADD R2, R2, #-1 HALT.BLKW x0021 DATA1.FILL x0003 DATA2.FILL x000E.END Explain what the program does. What will the value be contained in R2 when the program is executed? Perform 4

7 6.[20] Please assemble the program of Problem 5. x50000101 0100 1010 0000 x50010010 0000 0010 1001 x50021001 0000 0011 1111 x50030001 0000 0010 0001 x50040010 0010 0010 0111 x50050001 0100 1010 0001 x50060001 0010 0000 0001 x50070000 0111 1111 1101 x50080001 0100 1011 1111 x50091111 0000 0010 0101 x502B0000 0000 0000 0011 x502C0000 0000 0000 1110


Download ppt "Introduction to Computing Systems (4th Exam). 1.[10] Please convert each machine language instruction to its assembly language counterpart. –0101001001100000."

Similar presentations


Ads by Google