



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 a computer engineering final exam held in fall 2004. The exam covers topics such as minmax algorithms, assembly language programming, number systems and arithmetic, and mixed logic design. Students are required to write code, determine most negative and positive values, compute operations, and design circuits.
Typology: Exams
1 / 6
This page cannot be seen from the preview
Don't miss anything!




5 problems, 6 pages Final Exam 9 December 2004
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
5 problems, 6 pages Final Exam 9 December 2004
Problem 1 (3 parts, 28 points) MinMax
In this problem, you will write a procedure that finds the minimum and maximum values in an array of 250 integers beginning at memory location 0xABC0000. Use only the registers described in the table below plus $0. Your answer should fit in the boxes provided. Be sure to provide comments. The instruction set is listed in a table on the next page. register description register description $1 array pointer $4 max value $2 end test $5 input value $3 min value $6 predicate
Part A (8 points) To begin, write a code fragment that initialize variables before beginning the main loop.
label instruction comment MinMax:
Part B (14 points) Write a code fragment that loads the next array element and appropriately updates the current min and max value if necessary.
label instruction comment Loop:
Part C (6 points) Write a code fragment that adjusts the array pointer, loops if necessary, and returns to the caller if done.
label instruction comment
5 problems, 6 pages Final Exam 9 December 2004
Problem 3 (3 parts, 32 points) Representations and Arithmetic
Part A (15 points) For the 36 bit representations below, determine the most negative value, most positive value, and step size (difference between sequential values). All answers should be expressed in decimal notation. Fractions (e.g., 3/16ths) may be used. All signed representations are two’s complement.
representation most negative value most positive value step size signed integer (36 bits). (0 bits) unsigned fixed-point (18 bits). (18 bits) signed fixed-point (20 bits). (16 bits) signed fixed-point (24 bits). (12 bits)
Part B (8 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 six bit unsigned fixed-point and two’s complement fixed-point representations.
result unsigned error? signed error?
Part C (9 points) Answer the following questions for a single precision floating point representation discussed in class (1 sign bit, 23 mantissa bits, 8 exponent bits).
range of mantissa values (in decimal): to
largest represented value (power of two): 2 ________
approx. number of decimal significant figures:
5 problems, 6 pages Final Exam 9 December 2004
Problem 4 (3 parts, 26 points) Mixed Logic Design
Implement the following expressions to minimize total transistors (switches) required. Where two expressions are specified for a single part, your implementation should provide both outputs. Use proper mixed logic design technique. Any combination of Two, three, and four input AND, OR, NAND, NOR, and NOT gates may be used. Do not simplify the expression. Part A (6 points) OUTX = A ⋅ B + C ⋅ D + E ⋅ F
Part B (8 points) OUTY = A ⋅ B + C ⋅ D
Part C (12 points) OUTZ (^) 1 = A ⋅ B + C , OUTZ (^) 2 = B + C + D + E