{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ee102_midterm2_Sp2005

# ee102_midterm2_Sp2005 - ee102_midterm2_Sp2005.fm Spring...

This preview shows pages 1–3. Sign up to view the full content.

ee102_midterm2_Sp2005.fm 3/29/06 EE102L Midterm #2 - Spring 2005 1 / 10 C Copyright 2005 Gandhi Puvvada Spring 2005 EE102L Instructor: Gandhi Puvvada Midterm Exam II (30%) Date: April 29, 2005, Friday Open-Book Open-Notes Exam Time: 4:00 - 6:00PM in SGM124 Name: Total points: 180 Perfect score: 160 / 180 1 ( 5 + 6 + 9 = 20 points) 5 min. Combinational logic design: 1.1 Complete the K-Map for the functions F(A,B,C,D) produced by the combinational logic given below. Also produce F using two XOR gates and another 2-input gate. 1.2 On the side, we provided three PROMs. For each, state the size and the total number of bits. Note: total , not just in one location, total bits in the whole PROM! 1.3 Build two non-inverting 2-to-1 muxes by completing the following designs. You can use additional inverters if you need. Are the two designs functionally identical (meaning one can be used to replace the other) ? YES / NO 5 pts AB CD 00 01 11 10 00 01 11 10 A B C D F Map A B C D F A B C D F 2-input gate XOR XNOR A[3:0] D[3:0] 4 4 Size: __________ Total bits: ______ A[1:0] D[3:0] 2 4 Size: __________ Total bits: ______ A[3:0] D[1:0] 4 2 Size: __________ Total bits: ______ 6 pts 3+6 pts Y I0 I1 S VDD /Y /I0 /I1 S

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
ee102_midterm2_Sp2005.fm 3/29/06 EE102L Midterm #2 - Spring 2005 2 / 10 C Copyright 2005 Gandhi Puvvada The previous two design are again given below with the VDD/GND connections removed . Now again build two non-inverting 2-to-1 muxes with low active enable by completing the designs. You can use additional inverters if you need. Are the two designs functionally identical (meaning one can be used to replace the other) ? YES / NO 2 ( 4+18+8+18+8+16 = 72 points) 50 min. Small System Design : Find the smallest number between A and B which is evenly divisible by 20 10 (decimal 20). The range of your search is A to B, with both A and B included . A and B are two 7 bit binary numbers. A is always less than B. Since twenty is four times five (20 = 4 x 5), both 4 and 5 should divide the number evenly. A binary number divisible by 4 will have its two least significant bits zeros . If you find the number, you go to the FND (FND = Found) state, otherwise you go to NSN (NSN = No Such Number) state. Algorithm: Accept Ain into A and Bin into B . A = A 6 A 5 A 4 A 3 A 2 A 1 A 0 . Let us treat this 7-bit register A as actually made up of a 5-bit register Au ( A upper ) holding the upper 5 bits and a 2- bit register Al ( A lower ) holding the lowest 2 bits. Since we are looking for a number divisible by twenty, we will start with A 6 A 5 A 4 A 3 A 2 0 0 (upper five bits concatenated with two zeros) which is divisible by 4. Before checking to see if it is also divisible by 5, we need to see if the A 1 A 0 are actually two zeros or anything other than two zeros. If they are two zeros, then A 6 A 5 A 4 A 3 A 2 0 0 (symbolically written as Au00 ) is in fact A itself and can be tested for divisibility by 5. Otherwise, we want to increment this 7-bit number Au00 ( A 6 A 5 A 4 A 3 A 2 0 0 ) by 4 ( =100 ), which is same as incrementing the 5-bit number Au ( A 6 A 5 A 4 A 3 A 2 ) by 1 ( Au <= Au +1 ). We then test to see if the resulting 7-bit number Au00 is divisible by 5. If we fail, we increment the Au by 1 again. Of course, every time after incrementation, we need to see if Au
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}