Assignment 10, due Nov 8

Part of the homework for 22C:60, Fall 2004
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due at the start of class on the day indicated, and unless there is what insurance companies call "an act of God" - something outside your control; the only exceptions to this rule will be by advance arrangement.

  1. Consider the final note on object representation given in the notes for Chapter 10. Assume that we have a hardware floating point unit added to the Hawk architecture, able to do a floating-point add using the IEEE single-precision representation in the time it takes to execute 10 integer add or move instructions or 5 load or store instructions.

    Assume that your boss had declared that you must write a package to support polymorphic floating point operations, using either the IEEE format, our home-brew exponent-mantissa format, and perhaps others.

    a) Estimate the most compact feasible size for an object of type IEEE format floating point, able to be passed as a parameter to a routine that expects any floating type. (Assume that, for efficient space, we use a single class descriptor for all objects of type IEEE format floating point.)

    b) Estimate the time it will take to perform an add on two IEEE format floating point numbers taken from the activation record and returning the result to the activation record. Assume you must pass the parameters to the add method through the class descriptor, and that the routine itself does the add.

    Note: both of these estimates require writing code and then couting bytes, for part a, or adding up the instruction times, for part b.

  2. Consider a circuit built with one and gate and one or gate (no inverting bubbles on either gate) wired with the same topology as the simple RS flipflop given in the notes for chapter 11. This is a flipflop!

    Give a timing diagram that illustrates how you can manipulate the inputs to this circuit to set this flipflop, reset this flipflop, put it into an indeterminate state, and recover from that state. The Q output should follow the waveform given in the timing diagram for the R S flipflop in chapter 11 of the notes.

  3. Show how to you could build a master-slave flipflop out of two of the funny flipflops described in the previous problem?

  4. Do problems i, k and o from Chapger 11 of the notes.