Académique Documents
Professionnel Documents
Culture Documents
Name: ID Number:
____________________________________________________ ____________________________________________________
Achieved
This exam is closed book, closed notes. No calculators or other electronic devices allowed. Be concise, but show your work. Write legibly! Unreadable answers will not be graded. Time: 120 minutes.
Question 1 (26 points): Answer the following questions regarding the implementation of combinational logic with different standard components. a) Implement the functions F(x,y,z)=(0,2,5,7) and G(x,y,z)=(0,1,3,4,6) with two 41 multiplexers (one for implementing F and one for implementing G). Label all necessary inputs and outputs. Unused inputs/outputs should be left unlabeled. Show how you derive your solution! (6 points)
b)
Implement the functions F(x,y,z)=(0,2,5,7) and G(x,y,z)=(0,1,3,4,6) (same as in a)) with the ROM shown below. Mark intact fuses with or . Label all necessary outputs. Unused outputs should be left unlabeled. (4 points)
D0
z y x
I0 38 decoder I2
D7
c) Implement the functions F(x,y,z)=(0,2,5,7) and G(x,y,z)=(0,1,3,4,6) (same as in a)) with the PLA shown below. Mark intact fuses with or . Label all necessary outputs. Unused outputs should be left unlabeled. In each grey callout box, note the sum of minterms that is implemented the respective AND gate (leave blank if AND gate is not used). (8 points)
0 1
d) Implement the functions F(x,y,z)=(0,2,5,7) and G(x,y,z)=(0,1,3,4,6) (same as in a)) with the PAL shown below. Mark intact fuses with or . Label all necessary outputs. Unused outputs should be left unlabeled. In each grey callout box, note the sum of minterms that is implemented the respective AND gate (leave blank if AND gate is not used). (8 points)
Question 2 (20 points): Answer the following question regarding the design of sequential circuits. The goal is to design a sequential circuit that behaves as follows: The circuit is used to determine a winner in a sports match between two opponents Y and Z. In each round (i.e., each clock cycle) either Y or Z score. If Y scores, the input x is x=0. If Z scores, the input x is x=1. Input x is the only input to your design, which is derived from scores for Y, Z (i.e., Y and Z are NOT inputs). A winner is declared as soon as one opponent has a 2-point lead over the other. There are two output variables w and p: w indicates if a winner has been determined (w=0 means no winner yet, w=1 means one opponent has won); p indicates who the winner is (p=0 means opponent Y has won, p=1 means opponent Z has won; note: output p may have any value while w=0). After a winner has been reported by the circuit, the process begins from the beginning in the next cycle. Hint: It is not necessary to keep track of the absolute score. It is sufficient to track the difference in score between the opponents. For example: for your state machine a score of 5-4 is the same as 2-1 since Y leads by one point in either case. a) Draw a state diagram of a Moore machine that describes a sequential circuit for the above problem. (5 points)
b) Show a state table for the machine in a). Use binary state coding to represent states. Name the necessary flip-flops A, B, etc. (4 points)
c) How many flip-flops do you need to implement the above sequential circuit? (1 point)
d) Determine the minimized flip-flop input equation(s) and the minimized output equation(s). Use Karnaugh maps to minimize equations. Note your solutions in the box below. (10 points)
Output equation(s):
Question 3 (12 points): Answer the following question regarding timing issues in logic circuits. a) Determine the propagation delay for the circuit shown below with inputs x and y and output z. List all paths via which signals can propagate (use the gate numbers as indicators) in the table below. (8 points)
Propagation delay = ______________ ns b) If the output z of the circuit in a) was connected to a flip-flop with a setup time of ts=5ns and a hold time of th=7ns, what would be the minimum required time between any change on the inputs and the triggering edge on the clock signal to ensure correct operation? (4 points)
Question 4 (13 points): Answer the following questions regarding number representations and memories. a) What is the 6-bit binary representation of the decimal value (45)10? (1 point)
b) Determine the decimal value of the 5-bit sequence 11010 when (4 points)
interpreting it as signed binary with 2s complement as representation for negative numbers: _________________________________
interpreting it as signed binary with signed magnitude representation for negative numbers:__________________________________
c) What is the smallest and largest (decimal) value that can be represented by signed 4-bit numbers that use 2s complement representation for negative numbers? (2 points)
Smallest number:________________________
Largest number:_________________________
d) How many words can be stored in a random access memory with a word size of 16 bits and a total capacity of 8192 bits? (2 points)
e) For a random access memory with 64 words, what size decoder is necessary if (4 points)
10
Question 5 (15 points): Answer the following questions regarding representation of Boolean functions and algebraic modifications. a) Given a Boolean function F(x,y,z) = (0,1,4,6), what is the algebraic representation of this function (i.e., write out all the minterms)? (2 points)
F(x,y,z) = ______________________________________________ b) Given a Boolean function G(x,y,z) = (2,5,7), what is the product of maxterm representation of this function? (4 points)
c) Express Boolean function H(x,y,z) = xy+yz+yz as (the algebraic expression of) a sum of minterms. (3 points)
11
d) Simplify the following function K into a sum of product form with a minimum number of literals. Only use algebraic modifications (i.e., no Karnaugh maps). (6 points)
K(x,y,z)= x+x(z+(yx+y+yz))+(z+y)x+((y+z)(x+z))
12
Question 6 (14 points): Answer the following question regarding registers and counters. a) You are given a universal shift register with the functionality shown in the table below: Mode control Register operation S1 S0 0 0 Parallel load 0 1 Shift left 1 0 Shift right 1 1 No change The registers resets asynchronously to all 0s when clear is set to clear=1. All other functions are positive edge triggered. Assume the following inputs: Parallel inputs: I3=0 (left-most bit), I2=1, I1=1, I0=0 (right-most bit) Serial input for right-shift = 1 Serial input for left-shift = 0 What is the register value for the instances in time, t1t6, marked in the following timing diagram? (5 points)
t1 t2 t3 t4 t5 t6
CLK
clear
S1
S0
Register value at t1 is Register value at t2 is Register value at t3 is Register value at t4 is Register value at t5 is Register value at t6 is
13
b) Draw the circuit diagram for a 2-bit ripple counter. The counter should count up on each positive clock (CLK) edge if input x is x=1. There is no reset, enable, or other input. You may use any logic component and flip flop you want. Indicate the type of any flip-flop you use. Clearly label the outputs as follows: the least significant counter bit should be labeled C0, the most significant counter bit should be labeled C1. (5 points)