CS 208: Computer Organization and Architecture

Problems: floating point numbers, fast adders, and byte order

  1. Do problems C.26, 27, and 28 from Appendix C of the textbook. These problems concern carry lookahead adders, which are discussed in section C.6 (not Chapter 3, as I mistakenly said in class).

  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. Do problems 3.4.1 and 3.4.2 from the textbook.

  4. 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 Core i5 processor (little-endian), what output does this program produce? If I am using a computer with a Motorola G5 processor (big-endian), what output does the program produce?