CS 208: Computer Organization and Architecture

Problems: floating points, fast adders, and other digital fauna

  1. Do problems 3.36, 37, 38, and 39 from the textbook. Note that problem 3.36 is to be done in base ten.

  2. 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.

    • What is the smallest positive integer that is not representable?
    • What is the largest representable positive integer?
    • What is the smallest positive normalized number?
    • What is the largest positive denormalized number?
    • On page 3.10-6 (under Chapter/Appendix --> Chapter 3 --> 3.10) a paragraph begins "In 1963, the 7090 was replaced...." This paragraph goes on to describe a student who writes "(0.5 - x) + 0.5" instead of "1.0 - x" to "compensate for the lack of a guard digit." Explain in detail why the lack of a guard digit makes the sensible "1.0 - x" fail while "(0.5 - x) + 0.5" succeeds.
  3. Suppose I store a letter to my sister in a file called letter.txt, and the letter begins "Dear Jody". Now suppose I write a Java program that (1) opens letter.txt, (2) reads the first four bytes into an int variable k, and (3) prints k like so: System.out.println(k);. If I am using a computer with an Intel Pentium 4 processor (little-endian), what output does this program produce? If I am using a computer with a Motorola G4 processor (big-endian), what output does the program produce?