Docsity

Mid-Term Exam for CPSC 2105: Introduction to Computer Organization, Study notes of Computer Architecture and Organization

Toggle sidebar
bg1
CPSC 2105 Introduction to Computer Organization
Mid-Term Exam Thursday, July 7, 2005
This exam is open-book/open-notes. Show all of your work and write clearly. Answers that
do not show how the results were obtained or that are hard to read will get only partial credit.
DO NOT PUT ANY WORK ON THIS PAPER.
Test key with answers and comments
1. (20 points) Derive and show the truth table for the following circuit.
Answer: The function is obviously F(A, B, C) = AB + AC + BC
The truth table is
A B C AB AC BC F(A, B, C)
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 1 0 0 0 0 0
0 1 1 0 0 1 1
1 0 0 0 0 0 0
1 0 1 0 1 0 1
1 1 0 1 0 0 1
1 1 1 1 1 1 1
Grades on the exam: 89, 88, 80, 80, 72, 71, 67, 62, 36, 15
Average = 66.0 Standard Deviation = 23.5
pf3
pf4
pf5

Partial preview of the text

Download Mid-Term Exam for CPSC 2105: Introduction to Computer Organization and more Study notes Computer Architecture and Organization in PDF only on Docsity!

CPSC 2105 Introduction to Computer Organization

Mid-Term Exam Thursday, July 7, 2005

This exam is open-book/open-notes. Show all of your work and write clearly. Answers that do not show how the results were obtained or that are hard to read will get only partial credit. DO NOT PUT ANY WORK ON THIS PAPER. Test key with answers and comments

  1. (20 points) Derive and show the truth table for the following circuit. Answer: The function is obviously F(A, B, C) = AB + AC + BC The truth table is A B C AB AC BC F(A, B, C) 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 0 0 0 0 1 0 1 0 1 0 1 1 1 0 1 0 0 1 1 1 1 1 1 1 1 Grades on the exam: 89, 88, 80, 80, 72, 71, 67, 62, 36, 15 Average = 66.0 Standard Deviation = 23.
  1. (20 points) A CPU outputs two signals for memory: Read and Write, interpreted as Read = 1 Memory is Read Write = 1 Memory is Written We are guaranteed that the two values cannot be both set to 1 at the same time. We are given a memory that is controlled by the signals Select and R^ /W as discussed in the notes. Using a single two-input OR gate, design a circuit that converts the control signals output by the CPU to the control signals required by the memory chip. ANSWER: The problem specification can be given in the following table. Read Write Select R/W’ Comment 0 0 0 d Value of R/W’ is not used 0 1 1 0 1 0 1 1 1 1 d d Guaranteed not to happen Here is the circuit. The next table shows what this circuit actually does. Read Write Select R/W’ Action 0 0 0 0 No action 0 1 1 0 Memory Write 1 0 1 1 Memory Read 1 1 1 1 Memory Read
  1. (20 points) There have been many attempts to modify SR flip–flops to handle the input S = 1 and R = 1. We have discussed the JK flip–flop as one such extension. Another device, called the set–dominate flip–flop extends the SR design by having the input S = 1 and R = 1 set the flip–flop. The characteristic table for the set–dominant flip–flop is as follows. S R Q(T + 1) 0 0 Q(T) 0 1 0 1 0 1 1 1 1 Only this row is different from that for an SR. a) Modify a regular SR flip–flop to act as a set–dominate flip–flop. b) Show the excitation table for a set–dominate flip–flop. The excitation table for this flip-flop presents difficulties as the notation we use is not adequate to expression of the input for one case. Let’s start with a partial solution. Q(T) Q(T + 1) S R 0 0 0 d S = 0, R = 0 makes Q(T + 1) = Q(T) = 0 S = 0, R = 1 makes Q(T + 1) = 0 0 1 1 d S = 1, R = 0 makes Q(T + 1) = 1 S = 1, R = 1 makes Q(T + 1) = 1 1 0 0 1 S = 0, R = 1 makes Q(T + 1) = 0 But look at Q(T) = 1 and Q(T + 1) = 1. S = 0 and R = 0 makes Q(T + 1) = Q(T) = 1 S = 1 and R = 0 makes Q(T + 1) = 1 S = 1 and R = 1 makes Q(T + 1) = 1 The only input that does not get Q(T + 1) = 1 for Q(T) = 1 is S = 0 and R = 1. Note that the solution for the last line of the excitation table should be “anything but S = 0 and R = 1”. We have not developed a notation for this concept. Here is one answer. S = 0, R = 0 and S = 1, R = 0 can combine to S = d, R = 0 S = 1, R = 0 and S = 1, R = 1 can combine to S = 1, R = d. Here is another table that represents the same information. Note that d 0 can stand for either 0 0 or 1 0, so again we have covered the three possible answers 0 0, 1 0, or 1 1.

Q(T) Q(T + 1) S R

0 0 0 d 0 1 1 d 1 0 0 1 1 1 0 0 1 d Q(T) Q(T + 1) S R 0 0 0 d 0 1 1 d 1 0 0 1 1 1 d 0 1 1

Another possible solution would be to combine the two above as shown at left. Note the following. d 0 expands to 0 0 and 1 0 1 d expands to 1 0 and 1 1. We have 1 0 covered twice, but that is quite valid. COMMENTS: Again, the problem is that our notation does not cover the situation required for this design: we have no way to express “anything but 0 1”. This does not excuse the student from realizing this problem and writing the answer correctly. One student put the following Q(T) Q(T + 1) S R 1 1 d d Note that this allows S = 0 and R = 1, which will cause Q(T + 1) = 0.

Q(T) Q(T + 1) S R

0 0 0 d 0 1 1 d 1 0 0 1 1 1 d 0 1 d