Computer Science 03 60 265 Final Examination Friday December 14 th 2001 Dr. Robert D. Kent and Dr. Alioune Ngom Last Name: First Name: Student Number: INSTRUCTIONS EXAM DURATION IS 3 HOURs. CALCULATORS, NOTES AND BOOKS ARE NOT ALLOWED. CHEATING IS NOT ALLOWED AND I WILL GIVE 0 FOR CHEATING. READ ALL QUESTIONS CAREFULLY BEFORE YOU ANSWER. WRITE YOUR FINAL ANSWERS IN THE FRONT PAGES. USE THE BACK AND SCRAP PAGES FOR ROUGH WORK. WRITE YOUR FINAL ANSWERS WITH A PEN. Attempt all questions. If you need to make any assumptions, state them clearly with your answers. Write your answer neatly. Messy work is very hard to read and may cause you to lose marks. Characteristic tables and excitation tables are on last page. Questions Q#1 Q#2 Q#3 Q#4 Q#5 Q#6 Total Marks Totals 17 33 10 10 20 10 100 1
Question #1a: (8 marks) You are to program a PAL device for storing the four functions below. f 1 (w, x, y, z) = M(2, 3, 4, 5, 8, 9, 14, 15) don t cares d(w, x, y, z) = M(1, 7, 11, 13) f 2 (w, x, y, z) = m(0, 1) don t cares d(w, x, y, z) = M(5, 9, 13) f 3 (w, x, y, z) = w xȳ wxy f 4 (w, x, y, z) = w + x + w + y + w + y Fill in the four K-maps below and then write down the minimal sum-of-products forms that are going to be programmed into the PAL device. K-map for f 1 K-map for f 2 K-map for f 3 K-map for f 4 f 1 = f 2 = f 3 = f 4 = 2
Space for scrap work: 3
Question #1b: (5 marks) Using your results from Question #1a, complete the following PAL programming table. PAL Programming Table Inputs Term# w x y z Terms f 1 f 2 f 3 f 4 4
Question #1c: (4 marks) Using your results from Question #1b, complete and program the (incomplete) PAL device shown below. 5
Question #2a: (8 marks) Given the following state table, fill in the K-maps below and write down the minimal sum-of-products expressions for A t+1, B t+1, C t+1 and Z. Present state Input Next state Output Flip-flop inputs ABC X ABC Z S A R A J B K B T C 000 0 110 1 000 1 111 0 011 0 100 1 011 1 101 0 100 0 010 1 100 1 011 0 111 0 000 1 111 1 001 0 K-map for A t+1 K-map for B t+1 K-map for C t+1 K-map for Z A t+1 = B t+1 = C t+1 = Z = 6
Space for scrap work: 7
Question #2b: (13 marks) Complete the state table of Question #2a, then write down the product-of-sums expressions for S A, R A and T C, and the sum-of-products expressions for J B and K B (use the K-maps below). K-map for S A K-map for R A K-map for J B K-map for K B K-map for T C S A = R A = J B = K B = T C = 8
Question #2c: (6 marks) Implement... 1.... S A with a 4-to-1 multiplexer using A t and X as selection inputs. 2.... T C with a 2-to-1 multiplexer using B t as selection input. (Do not actually draw the circuits, simply complete the function tables given below) A t X S A 0 0 0 1 1 0 1 1 B t T C 0 1 9
Space for scrap work: 10
Question #2d: (6 marks) Below is part of the sequential circuit corresponding to the state table of Question #2a, where the inputs T C and S A are implemented with multiplexers defined from your function tables of Question #2c. Complete the circuit. High marks will be given for the clarity, simplicity and minimality of your implementation. S 0 D 0 D 1 S 0 S 1 D 0 D 1 D 2 D 3 2 to 1 MUX 4 to 1 MUX Clock T C C C S A A R A A J B B K B B 11
Question #3: (10 marks) Answer either Question #3a or #3b but not both. Question #3a: (10 marks) Derive the state table and the state diagram of the following sequential circuit A E TA A Z B DB B Present Next State Output State E = 0 E = 1 E = 0 E = 1 A B A B A B Z Z 0 0 0 1 1 0 1 1 00 01 11 10 12
Space for scrap work: 13
Question #3b: (10 marks) Discuss in detail how to design and implement the logic required to implement a memory unit, including clock, address lines and data lines and other necessary logic units. Discuss how data fetch and store operations are performed. State all assumptions. 14
Space for scrap work: 15
Question #4: (10 marks) Complete the following state table and its corresponding state diagram (the diagram must be complete). Present state Inputs Next state Flip-flop inputs A B X Y A B S A R A J B K B 0 0 0 1 0 0 0 X 0 0 1 0 0 0 0 1 0 1 0 1 0 1 X 1 0 1 1 0 0 X 0 1 1 0 0 1 1 0 1 X 1 0 1 0 X 0 1 0 1 1 0 1 1 1 X 0 1 1 1 0 X X 1 0 00 01 11 10 16
Space for scrap work: 17
Question #5: (20 marks) 1. (4 marks) Convert the number (A2K.W ) 25 to its base-10 representation. 2. (4 marks) State the truth-table for the function F = (a b + c)(āc + b + c) and derive the minimal algebraic form of F. 3. (2 marks) State a definition of maxterm. 4. (4 marks) Given the function expression: F = ā b c d + ā bc d + āb cd + ābc d + ab cd + abcd + a b c d + a bc d Simplify the expression for F and identify essential and non-essential prime implicants. 5. (4 marks) Draw the logic diagram for the boolean expression w(x + ȳ) + w xy The diagram should correspond exactly to the equation; assume that the complements of the inputs are not available. 6. (2 marks) Draw the NOR logic diagram for the expression using a multiple-level NOR circuit. w(x + ȳ) + w xy 18
19
20
Space for scrap work: 21
Question #6: (10 marks) 1. (5 marks) Derive the truth-table of an octal-to-binary priority encoder. 2. (5 marks) Draw the logic diagram of a 2-to-4 line decoder with only NOR and NOT gates, including an enable input. 22
23
Space for scrap work: 24
Flip-flop Characteristic Tables: Flip-flop Excitation Tables: 25