





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The instructions and problems for the ece 2030 computer engineering final exam held in fall 2010. The exam consists of five problems covering various topics such as instruction formats, karnaugh maps, arithmetic operations, cmos designs, and counters. Students are required to work in pencil, and calculators are not permitted. The exam covers material from the computer engineering course taken in the fall semester of 2010.
Typology: Exams
1 / 9
This page cannot be seen from the preview
Don't miss anything!






5 problems, 9 pages Final Exam 17 December 2010 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate the pages of the exam. For maximum credit, show your work. Good Luck! Your Name ( please print ) ________________________________________________ 1 2 3 4 5 total 28 32 24 28 32 144 http://blogs.static.mentalfloss.com/blogs/archives/20735.html
5 problems, 9 pages Final Exam 17 December 2010 Problem 1 (3 parts, 28 points) Instruction Formats, Etc. Part A ( 8 points) Suppose a datapath has three operand busses (two source, one destination), 244 different instruction types, and 128 registers where each register is 32 bits wide. Immediate operands can be in the range of ±8K. Label the fields of an I-type instruction format and indicate the maximum number of bits needed for each field. **Label: Label: Label: Label:
Part B** ( 8 points) Derive the simplified POS expression from the following Karnaugh map. Simplified POS expression: Part C (12 points) For each problem below, compute the operations using the rules of arithmetic, and indicate whether an overflow occurs assuming all numbers are expressed using a four bit unsigned and four bit two’s complement representations.
5 problems, 9 pages Final Exam 17 December 2010 Problem 3 (3 parts, 24 points) Counters Part A (7 points) Implement a toggle cell using only transparent latches and basic gates (XOR, AND, OR, NAND, NOR, NOT). Use an icon for the transparent latches. Label the inputs TE , CLR , Φ 1 , Φ 2 and the output Out. Part B (8 points) Now combine these toggle cells to build a divide by 24 counter. Your counter should have an external clear, external count enable, and five count outputs O 4 , O 3 , O 2 , O 1 , O 0. Use any basic gates (AND, OR, NAND, NOR, & NOT) you require. Assume clock inputs to the toggle cells are already connected. Your design should support multi-digit systems.
TE CLR Out TE CLR Out TE CLR Out
3 TE CLR Out
4 TE CLR Out
5 problems, 9 pages Final Exam 17 December 2010 Part C (9 points) Build a military timer (HH:MM) which displays hours (0...23) on the left and minutes (0...59) on the right as follows. In the diagram below: a) Fill in the label “Divide by ” on each counter. b) Label the number of output wires coming from each counter to its attached display. c) Draw the appropriate wiring connections to allow this military timer to correctly respond to external clear (Ext CLR) and count enable (Ext CE) signals, and to correctly increment the hour count when the maximum number of minutes have passed while the clock is still running. Use any basic gates you require. Assume clock inputs are already connected.
Out Max Count Divide by _____ CLR CE Out Max Count Divide by _____ (a) (a) (b) (b)
5 problems, 9 pages Final Exam 17 December 2010 Problem 5 ( 5 parts, 32 points) Assembly Language Programming Part A ( 14 points) Write a MIPS subroutine SumMags that reads in a vector of integers and sums up the magnitude (absolute value) of each element, placing the sum of magnitudes in register $ 3. Assume the length of the vector (# of integer elements) is given in register $ 2 and is > 0, and the base address of the vector is in register $ 1. Your code calls the subroutine Abs, which computes the absolute value of an integer x given in register $4; it returns ∣ x ∣ in register $4. Follow the steps outlined in the comments in the rightmost column below. You may modify only registers $ 1 through $ 4. label instruction comment SumMags: #^ initialize^ running sum^ ($^3 = 0) Loop: # load current vector element x into $ B: [leave blank for part A]
jal Abs # call Abs^ ($4 = |x|) C: [leave blank for part A]
Part B ( 5 points) To ensure that SumMags can be properly called by another subroutine and that SumMags can call Abs without losing any of the intermediate values it computes, you must add code before and after the “jal Abs” instruction. Write MIPS code to preserve registers before the jal by pushing them on the stack. Assume Abs can modify any registers, not just $4. label instruction comment B: jal Abs # call Abs^ ($4 = |x|)
5 problems, 9 pages Final Exam 17 December 2010 Part C ( 5 points) Write MIPS code to restore registers after the jal by popping them from the stack. Assume Abs can modify any registers, not just $4. label instruction comment jal Abs # call Abs^ ($4 = |x|) C: Part D ( 4 points) Write the MIPS instruction that is equivalent to the following microinstruction. # X Y Z rwe im en im va au en s/ a lu en lf su en st ld en st en r/ w msel description 6^2 8 7 1 0 x^0 x^1 8 0 x^0 0 x^0 Equivalent MIPS Instruction: Part E ( 4 points) Write the MIPS instruction that is equivalent to the following microinstruction. # X Y Z rwe im en im va au en s/ a lu en lf su en st ld en st en r/ w msel description 7 3 x 6 1 1 FFFA 0 x 0 x 1 0 0 0 x 0 Equivalent MIPS Instruction: