CS 207
Midterm 2
Ondich
Due 11:10 AM Wednesday, November 8, 2000

For this exam, you may use your textbook, your notes and assignments, your brain, the Math/CS computers, and divine inspiration, if available. If you get stuck, talk to Jeff Ondich, but please don't talk to anyone else about the exam.

Explain and justify your answers. Submit your answers on paper.

  1. (10 points) The following questions concern IEEE 754 32-bit floating point numbers. When I refer to a "representable number," I mean a number whose exact value is one of the values that has a 32-bit IEEE 754 representation.



  2. (15 points) Suppose we have a display that consists of four line segments forming a square. The display has four input lines, one for each side of the square. When any of the input lines is asserted, the corresponding side of the square lights up.

    Your goal for this problem is to design a clock-driven circuit that will create a simple animation on the four-line display. The "frames" of the animation will be:

    
    |_
    
    _|
    
    _
     |
    
    and
    
     _
    |
    

    That is, there's a little right-angle shape that goes around in a circle.

    Your job is to design a clock-driven circuit that has one input (other than the clock), which we will call A, and four outputs, T, R, L, and B (top, right, left, and bottom). When A=0, the little right angle should go around in a circle clockwise as the clock ticks. When A=1, the shape should go around counter-clockwise.

    You may find it helpful to design a state diagram and use logical formulas to express T, R, L, and B in terms of state numbers. If so, show me your diagram and formulas.

  3. (2 points) Tell me a joke, if you wish. Otherwise, go ahead and collect your 2 points humorlessly.

  4. (12 points) Do Problem 5.11 on page 428 of Patterson and Hennessy.

  5. (12 points) Carry lookahead versus ripple carry.