August 9, 2013 Instructor: – Read!
COMP 2280 – Introduction to Computer Systems Final Exam
Name: _____________________________________ St. Number: _________________________________ Time: 3 hours Page 1 of 12
THE UNIVERSITY OF MANITOBA
Copyright By PowCoder代写 加微信 powcoder
• Answer all questions on the exam.
• Place your name and student number at the top of each page of this exam.
• No aids are permitted (no books, notes, electronic devices, etc.)
• There is a total of 60 marks.
Part I: Short Answers (23 Marks)
1. What is the difference between asynchronous and synchronous timing? [2]
2. What is the difference between polling and interrupt driven i/o? [2]
3. List the 6 main stages in an instruction cycle. [2]
August 9, 2013 Instructor: OMP 2280 – Introduction to Computer Systems Final Exam
Name: _____________________________________ St. Number: _________________________________ Time: 3 hours Page 2 of 12
THE UNIVERSITY OF MANITOBA
4. What is the purpose of the stack pointer and what is the purpose of the frame pointer with respect to their use in subroutines?
5. Convert the base 10 number -105 into its 16-bit 2’s complement representation. Give your answer in both binary and hexadecimal. Show your work.
6. For the single bus computer described in class list the sequence of micro operations (for manipulating control points) required to add the value in the AC to the value in the PC, and then
[4] store the result into memory at the address in the AC. The values of the AC and the PC are not changed. Write each group of micro-operations, separated by commas, on a single line and include the appropriate ALU code. Do NOT give micro-code/micro-instructions, instead give high-level micro-operations.
August 9, 2013 Instructor: OMP 2280 – Introduction to Computer Systems Final Exam
Name: _____________________________________ St. Number: _________________________________ Time: 3 hours Page 3 of 12
THE UNIVERSITY OF MANITOBA
7. Give the 32-bit IEEE floating point representation for the base 10 number -105.375. Do the conversion by hand and show your work. Give the final answer as 8 hex digits.
8. What is a bus used for within a computer system? Name the three buses between a CPU and
9. What are two types of bus arbitration? [1]
August 9, 2013 Instructor: OMP 2280 – Introduction to Computer Systems Final Exam
Name: _____________________________________ St. Number: _________________________________ Time: 3 hours Page 4 of 12
THE UNIVERSITY OF MANITOBA
10. Complete the truth table for a Full Adder by filling in the columns labeled Sum and Cout. A, B
and Cin are the bits to be added together. Cin is the carry in; Sum is the sum bit of the addition; and Cout is the carry out from the addition.
000 001 010 011 100 101 110 111
11. Use the results from question 10 to fill in the Karnaugh maps for Sum and Cout and find the
simplest expressions for Sum and Cout (exclusive-or is acceptable).
August 9, 2013 Instructor: II – Long Answers (17 Marks)
Name: _____________________________________ St. Number: _________________________________ Time: 3 hours Page 5 of 12
THE UNIVERSITY OF MANITOBA
COMP 2280 – Introduction to Computer Systems Final Exam
12. Draw a state diagram for a finite state machine (FSM) with one input X and one output Y. The output is a function of the current state. The output is 1 when the FSM detects the sequence 1101 as
[5] the input, in all other cases the output is 0. Only five states are required. For example:
Input: 00110110101011101011001101
Output: 00000100100000001000000001
In the state diagram for the FSM, give each state a name and clearly label the initial state and the output for each state. Each transition must be clearly labeled with the input that causes the transition. Do NOT draw a transition table and do NOT draw a circuit diagram.
August 9, 2013 Instructor: Cooper
13. Given the following circuit:
Name: _____________________________________ St. Number: _________________________________ Time: 3 hours Page 6 of 12
THE UNIVERSITY OF MANITOBA
COMP 2280 – Introduction to Computer Systems Final Exam
(A) WriteoutatruthtableforS,RandQwhereSandRarefunctionsofX,Y,andZandQis a function of S and R. The headings for the columns in the truth table should be X, Y, Z, S, R and Q. X, Y and Z are inputs, and S, R and Q are outputs.
(B) Write the expressions for S and R in terms of X, Y and Z. You can do this either from the truth table or the circuit diagram. In either case write the simplest sum of products expressions possible.
(C) State the value of Q for each combination of X, Y, Z. In each case give the value of Q after there are no more changes due to gate delays.
I. Set X = 0, Y = 0, Z = 0. After all the changes due to gates delays what is Q?
II. Change Z to 1. After all the changes due to gate delays what is the value of Q?
III. Change Y to 1. After all the changes due to gate delays what is the value of Q?
IV. Change Z to 0. After all the changes due to gate delays what is the value of Q?
V. Change X to 1. After all the changes due to gate delays what is the value of Q?
VI. Change Z to 1. After all the changes due to gate delays what is the value of Q?
VII. Change Y to 0. After all the changes due to gate delays what is the value of Q?
THE UNIVERSITY OF MANITOBA
COMP 2280 – Introduction to Computer Systems Final Exam
Name: _____________________________________
St. Number: _________________________________ August 9, 2013 Time: 3 hours Instructor: 7 of 12
Use this page to complete your answer to question 13. Question 14 is on the next page.
August 9, 2013 Instructor: OMP 2280 – Introduction to Computer Systems Final Exam
Name: _____________________________________ St. Number: _________________________________ Time: 3 hours Page 8 of 12
THE UNIVERSITY OF MANITOBA
14. Consider a counter that counts out the sequence 0,7,4,5,2,3,6,1,0, … on each rising clock edge. The counter has 3 output bits Q2Q1Q0, which is the binary representation of the current number
[5] counted. Your solution must include the truth table for the next state given the current state and the state equations (in sum-of-products form) for the state variables based on the truth table. Do NOT use exclusive-or in the state equations. Assume the counter uses D flip-flops. Simplify the expressions in the equations where possible. Do NOT draw a circuit diagram.
August 9, 2013 Instructor: III: Programming (20 Marks)
Name: _____________________________________ St. Number: _________________________________ Time: 3 hours Page 9 of 12
THE UNIVERSITY OF MANITOBA
COMP 2280 – Introduction to Computer Systems Final Exam
15. Write a complete LC-3 assembly language program. The program displays a prompt. Then in a loop read characters until EOT is entered. Use polling to read each character from the keyboard data
[6] register. As each character is read, use polling to display the character by writing it to the display data register. Do not display the EOT. Display an end of processing message before the program ends. EOT has the value x04 and is entered by pressing ctrl-D. Use PUTS to display the prompt and the end of processing message. You must include a register dictionary.
The keyboard status register is at address xFE00. The keyboard data register is at address xFE02. The display status register is at address xFE04. The display data register is at address xFE06.
A sample run of the program might be:
Enter some characters (ctrl-D to end): This is a test.
Programmed by . End of processing.
August 9, 2013 Instructor: OMP 2280 – Introduction to Computer Systems Final Exam
Name: _____________________________________ St. Number: _________________________________ Time: 3 hours Page 10 of 12
THE UNIVERSITY OF MANITOBA
16. Write a complete LC-3 assembly language program. The purpose of the program is to display the content of a binary tree. The program must consist of a main program and one recursive
[14] subroutine. A stack pointer and a frame pointer must be used.
Write a recursive subroutine named display that is passed the address of a binary tree. Use an infix traversal to display the content of the binary tree. A node in the tree consists of three 1-word fields. The first field holds an ASCII character and is the value to be displayed for the node. The second field holds the address of the left subtree. The third field holds the address of the right subtree. An address of 0 indicates that there is no left or right subtree.
The main program must establish the stack pointer, display a heading, call the subroutine named display with the address of a binary tree, and display a termination message. Assume a label named root occurs in the program and is the label of the first node in the binary tree. You do not need to define root in your program but you must define any other labels used in the program.
You must include a register dictionary for the main program. You must include a register dictionary and a description of the activation record for the subroutine.
A sample run of the program might be:
The binary tree contains: A
Programmed by End of processing.
August 9, 2013 Instructor: ontinue the solution to question 16 here.
Name: _____________________________________ St. Number: _________________________________ Time: 3 hours Page 11 of 12
THE UNIVERSITY OF MANITOBA
COMP 2280 – Introduction to Computer Systems Final Exam
THE UNIVERSITY OF MANITOBA
COMP 2280 – Introduction to Computer Systems Final Exam
Name: _____________________________________
St. Number: _________________________________ August 9, 2013 Time: 3 hours Instructor: 12 of 12
Use this page to continue the solution to any of the questions or for scrap work.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com