Cs Midterm 2011
Cs Midterm 2011
Student id:
Name:
Total 4 pages, including problem set (A, B, C) and Appendix C totally 105 points.
2. 3. 4. 5.
6. 7. 8. 9.
12. What is the answer of a binary number 11010110 after [4%] (1) right shift (2) rotate left.
13. [4%] What are the differences in the use of the following storage systems: general-purpose registers, main memory, mass-storage?
Mass Storage
Figure P5: Typical Architecture of an Imaginary Computer System 14. [2% for each sub-problem] What are the functions of the following instructions (expressed in hexadecimal) in the machine language of Appendix C? (a) 1234 ; (b) 2234 Answer by writing a short description of each instruction in English or Chinese. 15. Suppose the memory cells at addresses AF through B1 in the machine described in Appendix C contain the flowing bit pattern (expressed in hexadecimal): Address Content AF B0 B0 B0 B1 AF If we started the machine with its program counter containing AF, (a) What would the first instruction do? [2%] (b) After instruction 1, what would happen (i.e., if the program keeps running to the end, or something else)? [2%] 16. Classify the following software into three categories: operating systems, applications, and utilities. [8 %] (1) Words
(2) UNIX (3) Minesweeper () (4) (5) (6) (7) System monitor Windows 7 DOS File Explorer ()
(8) Linux. 17. What are the full terms of the following abbreviations? [8%, 2% for each] (1) BIOS (2) GUI (3) ROM (4) FIFO
Please construct a half adder by fundamental logic gates. [5%] 20. Suppose the memory cells at addresses 00 through 05 in the machine described in Appendix C contain the following bit patterns (expressed in hexadecimal): Address Content 00 12 01 02 02 32 03 42 04 C0 05 00 Assume that the machine starts with its program counter equal to 00: a. Translate each of the instructions that are executed into English. [6%] b. What bit pattern is in the program counter when the machine halts? [2%]
c. What bit pattern is in the memory cell at address 42 when the machine halts? [2%] 21. What is an interrupt handler? Please describe its function. [3%] 22. What is the main purpose of time-sharing? [3%] How does time-sharing work? Please use three processes to describe it. [4%]
2 3
4 5