Computer Engineering Final Exam - Fall 2004, Exams of Computer Science

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

2012/2013

Uploaded on 04/08/2013

sehgal_98
sehgal_98 🇮🇳

4.8

(4)

121 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 2030 1:00pm Computer Engineering Fall 2004
5 problems, 6 pages Final Exam 9 December 2004
1
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 24 32 26 30 140
pf3
pf4
pf5

Partial preview of the text

Download Computer Engineering Final Exam - Fall 2004 and more Exams Computer Science in PDF only on Docsity!

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 = AB + CD + EF

switches =

Part B (8 points) OUTY = AB + CD

switches =

Part C (12 points) OUTZ (^) 1 = AB + C , OUTZ (^) 2 = B + C + D + E

switches =