Anda di halaman 1dari 16

COEN/ELEN 21- Final-Spring 2011 1

Santa Clara University


School of Engineering

ELEN 21/COEN 21
Logic Design
Final Examination
June 6, 2011

HONOR CODE
All students taking courses at School oI Engineering agree, individually and collectively, that
they will not give or receive unpermitted aid in examinations or other course work that is to be
used by the instructor as the basis oI grading.

Name
Signature
Read Carefully
Close book examination, one sheet oI notes.
Solve 10 out of the 15 given problems. Circle the numbers of the problems you selected:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, and 15. Note that, if you do not circle these
problems, I will give you the grades for the first 10 problems.
Show your work neatly in the place assigned on the examination paper.
our grade will be aIIected by: Correctness oI the response and Clarity oI the presentation,
i.e. the right Iinal answer is not suIIicient.
!artial credit is given except Ior the extra credit problems which are not obligatory
ou may use the reverse side oI the pages.
eep the exam stapled.




COEN/ELEN 21- Final-Spring 2011 2

!roblem 1. Short Answers (10)

a) A Iinite state machine has S states, what is the minimum number oI Ilip-Ilops needed to
design this machine? Give the answer in term oI S.







b) Using an 8-bit two`s complement numbers, what are the highest positive number and the
smallest negative number. Also express these numbers in decimal.






c) How many inputs a 32x8 ROM has?






d) What is the name oI the device shown and explain how it works.









COEN/ELEN 21- Final-Spring 2011 3

!roblem 2 Consider the 4X4 RAM shown.

a) What is the role oI the decoder?
b) How many bits are written on, or read Irom
at a time?
c) What is the role oI Read/Write wire?








































COEN/ELEN 21- Final-Spring 2011 4

!roblem 3. Explain clearly how does the addressable register Iile operate: what is the role oI
each decoder. Can one read (or write on) more than one register at a time? Why and why not.

























COEN/ELEN 21- Final-Spring 2011 5

!roblem 4. Use appropriate combinational components to design a circuit that computes the
minimum oI two 8-bit numbers, A and B. The circuit should yield the minimum. (C)




COEN/ELEN 21- Final-Spring 2011 6

!roblem 5. Design an add/sub circuit. Use Iull-adders and other logical gate, as needed and
explain how your circuit works as an adder and as a subtractor. (C)




COEN/ELEN 21- Final-Spring 2011 7

!roblem 6. Designs a 4-input combinational circuit such that its output is 1 when the number oI
1`s in the 4-bit binary number at the inputs is even.





COEN/ELEN 21- Final-Spring 2011 8

!roblem 7. Given the Iollowing truth table Ior a FSM: input X, present state q1q0, next state
Q1Q0, and output Z,

1. s this FSM oI type Mealy or Moore? How did you decide
2. Determine the number oI states
3. Draw the state diagram showing also the input and the output.

In !S NS Out
X q1 q0 Q1 Q0 Z
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 1 0 1
0 1 1 1 0 1
1 0 0 1 1 0
1 0 1 1 1 0
1 1 0 0 0 1
1 1 1 0 0 1










COEN/ELEN 21- Final-Spring 2011 9

!roblem 8 Develop the state diagram Ior a FSM that has one input, x, and one output, y. The
FSM recognizes the sequence 101 at its input (start Irom the leIt). The output is 1 when the
sequence is recognized, otherwise it is zero. Name and deIine every state used.





COEN/ELEN 21- Final-Spring 2011 10

!roblem 9 Develop the circuit that implements the FSM represented by the Iollowing truth
table . Draw the circuit.


State Name !S Input NS Output
66 - ""
Off 00 0 00 0
00 1 01 0
On 1 01 0 10 1
01 1 10 1
On2 10 0 11 1
10 1 11 1
On3 11 0 10 0
11 0 10 0








COEN/ELEN 21- Final-Spring 2011 11

!roblem 10. Design a 4-bit register that has one control input S. When:
S 0, the register holds its present values, and
S 1, the register shiIts the data in the register to the right.
Label your design carefully and clearly.





COEN/ELEN 21- Final-Spring 2011 12

!roblem 11. Complete the truth table Ior one stage magnitude comparator and draw the obtained
circuit.


gt eq lt aibi GT EQ LT

1 0 0 xx
0 0 1 xx
0 1 0 00
0 1 0 01
0 1 0 10
0 1 0 11






COEN/ELEN 21- Final-Spring 2011 13

!roblem 12. Write expressions Ior the Iunctions: w, x, y, and z.

w (A, B, C, D)

x (A, B, C, D)

y (A, B, C, D)

z (A, B, C, D)







COEN/ELEN 21- Final-Spring 2011 14

!roblem 13 Design a 4-to-1 multiplexers using, 2-to-1 multiplexers units. Draw the 2-to-1
Mux, then use it as a component to design the 4-to-1 Mux.





















COEN/ELEN 21- Final-Spring 2011 15

!roblem 14 Analyze the FSM shown. Develop expressions Ior the next state, and the state
table or the state diagram.



























COEN/ELEN 21- Final-Spring 2011 16

!roblem 15. A Coke machine dispenses a can Ior $1.25 and it accepts only dollar bills and/or
quarters, no other smaller denomination. Develop the state machine to control this machine,
given that aIter delivery oI the can, it goes back immediately to its initial state. Also, iI the cash
deposited is higher than the price, it will dispense the change. (No detail about the change should
be considered) Develop also the State Diagram or Table, no state assignment is necessary

Anda mungkin juga menyukai