Midterm 1 -- Open book section

26 February, 1996

The entire exam is to be turned in at 1:05 PM. Work the closed book section first and turn it in before you consult your books and notes to work on the open book section.

Problem 1. (12 points)

Translate the following expression into RPN:

Problem 2. (10 points)

Why is it useful for a computer to be able to add four to an register in a single instruction? Under what circumstances would you expect this operation to be performed.

Problem 3. (18 points)

Consider the following C code

where u, x, y, and z are all integer variables. Describe how this C statement could be executed on one of the workstations in 004, i.e., one of the workstations that you used for Homework #1. Assume that the variables are all local to their procedures and consequently are all stored on the stack. It isn't necessary to write assembly code, but you do need to convince the instructor that you could write assembly code.

Back to the Handout index
Return to Dean Brock's home page
UNCA CSCI logo Return to the UNCA Computer Science home page