Download Computer Organization Exam - CSCI 2150 (Tarnoff) at East Tennessee State University - Prof and more Exams Computer Architecture and Organization in PDF only on Docsity!
Points missed: _____ Student's Name: _________________________________
Total score: _____ /100 points
East Tennessee State University Department of Computer and Information Sciences CSCI 2150 (Tarnoff) – Computer Organization TEST 2 for Spring Semester, 2007
Read this before starting!
- The total possible score for this test is 100 points.
- This test is closed book and closed notes.
- Please turn off all cell phones & pagers during the test.
- All answers must be placed in space provided. Failure to do so may result in loss of points.
- 1 point will be deducted per answer for missing or incorrect units when required. No assumptions will be made for hexadecimal versus decimal, so you should always include the base in your answer.
- If you perform work on the back of a page in this test, indicate that you have done so in case the need arises for partial credit to be determined.
- Calculators are not allowed. Use the tables below for any conversions you may need. Leaving numeric equations is fine too.
Binary Hex Binary Hex Power of 2 Equals 0000 0 1000 8 23 8 0001 1 1001 9 24 16 0010 2 1010 A 2 5 32 0011 3 1011 B 2 6 64 0100 4 1100 C 2 7 128 0101 5 1101 D 2 8 256 0110 6 1110 E 29 512 0111 7 1111 F 2 10 1K 2 20 1M 2 30 1G
“Fine print”
Academic Misconduct: Section 5.7 "Academic Misconduct" of the East Tennessee State University Faculty Handbook, June 1, 2001:
"Academic misconduct will be subject to disciplinary action. Any act of dishonesty in academic work constitutes academic misconduct. This includes plagiarism, the changing of falsifying of any academic documents or materials, cheating, and the giving or receiving of unauthorized aid in tests, examinations, or other assigned school work. Penalties for academic misconduct will vary with the seriousness of the offense and may include, but are not limited to: a grade of 'F' on the work in question, a grade of 'F' of the course, reprimand, probation, suspension, and expulsion. For a second academic offense the penalty is permanent expulsion."
Short answers – 2 points each unless otherwise noted
For the following two circuits, identify the value of the output Q from the following choices. Consider the D-latch a rising edge triggered latch. a.) 1 b.) 0 c.) Q 0 (stored value of Q) d.) undefined/illegal e.) can't tell
- True or False: The expression ( A + B + C )⋅( B + A )is in proper Product-of-Sums format. False: The inverted output of the sum B + A puts an inverter between the output of one of the OR gates and the input of the final AND gate. In a POS circuit, all inverters must be at the OR inputs.
- How many cells would a two-input Karnaugh Map have? There are 2^2 = 4 possible combinations of 1's and 0's for two inputs. Therefore, since the Karnaugh map must have one cell for each combination, there are 4 cells.
a.) 2 b.) 4 c.) 6 d.) 8 e.) 12 f.) 16 g.) 32
- What is the largest number of input variables a Karnaugh map can handle and still remain two- dimensional? Remember that the purpose of a Karnaugh map is to rearrange the truth table so that adjacent cells can be combined allowing for a term to drop out. In other words, the key to the effectiveness of Karnaugh maps is that each cell represents the output for a specific pattern of ones and zeros at the input, and that to move to an adjacent cell, exactly one of those inputs can change, the rest must remain the same. Take for instance the 16 cell (4-input) Karnaugh map. The cell in the third column of the second row represents the condition where A=0, B=1, C=1, and D=1. Moving to the cell immediately to the left will change only C; moving right will change D; moving up changes B; and moving down changes A. Therefore, there is an adjacent cell that represents a change in any of the four input variables.
Since a square only has 4 sides, it can only represent 4 single-bit changes in the inputs. Therefore, 4 is the maximum. a.) 2 b.) 3 c.) 4 d.) 5 e.) 6 f.) 7 g.) 8
- Answer: ______
D S Q
CLK
R
- Answer: ______
D S Q
CLK
R
C A
With both S^ and R^ high, the rising clock copies D=1 to Q.
Since this is a rising edge triggered latch, a falling edge has no effect, and therefore, Q0 remains unchanged.
00 01 11 10 00 01 11 10
AB
CD
If we do this for all of the options a through e, we get the following truth tables. Column a equals 1 only when A=1 and B=0 or when C=1. Column b equals 1 when A=1 or when C=1. Column c equals 1 only when A=1 and B=1 or when C=1. Column d equals 1 when B=1 or when C=1. Column e equals 1 when A=1 or when B=0 and C=1. The only column that matches the original truth table exactly is column a. Therefore, the answer is a.
A B C a b c d e 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1
Column a is the only column that matches the original truth table. Therefore, the answer is a.
The next six problems use the state machine circuit to the right. Assume that the states are numbered so that bit S 3 is the most significant bit and bit S 0 is the least significant bit.
- What is the maximum number of states that this system can handle? Since there are four latches, then the internal memory of this state machine can remember 24 = 16 states: 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, and 1111. Therefore, the answer is 16.
- What is the current state of this system? Keep your answer in binary. The current state is the value stored in the four latches and found at the Q outputs. In the case of the diagram above, that is 0111 with S 3 being used as the most significant bit.
- If the clock were to pulse right now, what would the next state be? Keep your answer in binary.
The next state is the value present at the D inputs, i.e., the value that would be stored if we had a clock pulse occur. In the case of the diagram above, that is 0000 with S 3 being the most significant bit.
Next state logic
D Q S (^2)
D Q S (^1)
D Q S (^0)
Output logic
Clock
I 1 = 1
0
0
(^0 )
1
1 0
D Q S (^3)
(^0 )
I 0 = 1
- The truth table to the right represents the output logic truth table for the above state machine. Circle the row that identifies the current output condition of the system, i.e., which row is represented by the state of the logic in the diagram above? The output is determined by the current state, i.e., 0111. Therefore, the seventh row identifies the output, which matches the 0 output from the figure.
- If the clock were to pulse right now, what would the new output be? Use the truth table from the previous problem to answer the question. a.) 0 b.) 1 c.) Not enough information given Since the next state is 0000, we go to the row in the truth table for 0000. This shows us that the output for the next state is 0.
- How many rows would the next state logic truth table have for this circuit?
a.) 2^2 = 4 b.) 2^3 = 8 c.) 2^4 = 16 d.) 2^5 = 32 e.) 2^6 = 64
Remember that the next state logic truth table depends on the current state (derived from S 3 , S 2 , S 1 , and S 0 ) and the current input (I 1 and I 0 ). This gives us 6 inputs. Since there are 2^6 = 64 combinations of 1's and 0's for 6 inputs, the answer is e.
- True or False: Renumbering the states of a state machine has no effect on the "next state" logic for the digital hardware implementation. The numbering of the states directly affects the next state truth table, and therefore changes the logic that is derived from it. Therefore, the answer is False.
- How many latches will a state machine with states numbered from 0 to 63 require?
a.) 3 b.) 4 c.) 5 d.) 6 e.) 7 f.) 8 g.) 9 With states numbered 0, 1, 2, 3, … , and 63, there will be 64 states. Since 63 10 = 111111 2 , we will need 6 bits to represent the state. Therefore, the answer is d. Another way of looking at it is to see how many states it is possible to represent with n bits, and to figure out what value of 2n^ is greater than or equal to 64 different values. 2^4 = 16 which is not enough, 2^5 =32 is still not enough, but 2^6 =64 is exactly enough. Therefore, 6 bits will do the trick.
- For the multiplexer/selector shown to the right, what is the output Y? Remember that a multiplexer is like a digitally controlled channel changer using the inputs S 1 and S 0 , to select either D 0 , D 1 , D 2 , or D 3 to be output to Y. The way it works is that the decimal equivalent of the bits at the inputs S 1 and S 0 identify the subscript of the D input being routed to Y. Since S 1 and S 0 equal 0 and 1 respectively, and since 01 2 = 1 10 , then D 1 is routed to Y. Since D 1 equals 1, then the output at Y equals 1.
S 3 S 2 S 1 S 0 X 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1
D 0 D 1 D 2 D 3 Y
S (^1) S (^0)
0 1 1 0 0 1
- In the Karnaugh map to the right, draw the best pattern of rectangles you can. Do not derive the SOP expression. Remember to only include X's in rectangles if they make the rectangle bigger. Do not include an X if it adds an additional rectangle. There were actually two answers for this problem, both of which produced an optimal result.
- In the space to the right, draw the decoding logic circuit with an active-low output that identifies when A = 1, B = 1, C = 0, D = 1, and E = 1. An active-low decoder is meant to have a zero output for exactly one pattern of 1's and 0's at its inputs. This is done with a NAND gate where the inputs that are supposed to be 1 go straight into the inputs while the inputs that are supposed to be 0 pass through an inverter first.
- Create a Karnaugh map from the truth table below. Do not worry about making the rectangles.
A B C X 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 1
- Show the D latch output waveform Q based
on the inputs D , S , R , and clock indicated in the graph to the right. Assume the latch captures on the rising edge. (The figure below is just for a reference.)
00 01 11 10 (^00 1 1 1 ) (^01 1) X 0 0 (^11 1 0) X 1 (^10 1 0 1 )
00 01 11 10 (^00 1 1 1 ) (^01 1) X 0 0 (^11 1 0) X 1 (^10 1 0 1 )
00 01 11 10 (^00 1 1 1 ) (^01 1) X 0 0 (^11 1 0) X 1 (^10 1 0 1 )
AB
CD
S
R
D
Clock
Q
Constant logic 1
D S Q
R
Clock
AB
CD AB
CD
0 1 (^00 1 ) (^01 0 ) (^11 1 ) (^10 1 )
AB
C
Note that Q starts of equal to 1 because ^S goes low.
A
B
C
D
E
Longer answers – Points vary per problem
- Make the state diagram that will output a ‘1’ when the sequence ‘011’ is detected in a serial stream of bits. For example, if the following binary stream is received:
then 1’s will be output at these points. At all other times, the system will output zeros. Label the input D. (8 points)
- Derive the minimum SOP expression from the Karnaugh map below. (6 points)
The final answer is:
A·B + C·D + B·C
00 01 11 10 (^00 1 1 1 ) (^01 1 0 1 ) (^11 1 0 1 ) (^10 1 0 0 )
AB
CD
No digits 0
Initial state 1 digit 0
digits 0
digits 1
D = 0
D = 0
D = 1
D = 1
D = 1
D = 1
D = 0 D = 0
Blue rectangle A B C D 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 0 A and B drop out. Since both C and D equal 0 for all cells, they are inverted. _ _ C·D
Green rectangle A B C D 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 0 A and D drop out. Since both B and C equal 1 for all cells, neither is inverted.
B·C
Red rectangle A B C D 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 C and D drop out. Since both A and B equal 0 for all cells, they are inverted. _ _ A·B