CSCI 2321 (Computer Design), Spring 2018:
Homework 4

Credit:
20 points.

Reading

Be sure you have read, or at least skimmed, the assigned readings from Chapter 3.

Honor Code Statement

Please include with each part of the assignment the Honor Code pledge or just the word ``pledged'', plus one or more of the following about collaboration and help (as many as apply).1Text in italics is explanatory or something for you to fill in. For written assignments, it should go right after your name and the assignment number; for programming assignments, it should go in comments at the start of your program(s).

Problems

Answer the following questions. You may write out your answers by hand or using a word processor or other program, but please submit hard copy, either in class or in one of my mailboxes (outside my office or in the ASO).

  1. (5 points) Use the algorithm shown in Figures 3.3 and 3.4, adapted to work on 6-bit quantities rather than 32-bit quantities, to multiply 50 (0x32) by 10 (0x0a). Convert the result back to base-10 so you can check that it's right. (This is very much like the example in Figure 3.6, but using 6 and 12 bits rather than 4 and 8.)

  2. (5 points) Use the algorithm shown in Figures 3.8 and 3.9, adapted to work on 6-bit quantities rather than 32-bit quantities, to divide 60 (0x3c) by 17 (0x11). Convert the result (quotient and remainder) back to base-10 so you can check that it's right. (This is very much like the example in Figure 3.10, but using 6 and 12 bits rather than 4 and 8.)

  3. (5 points) A 32-bit value doesn't have any particular intrinsic meaning; instead its meaning depends on how it's interpreted. For the 32-bit value represented by 0x0c000000, what does it mean if interpreted in each of the following ways?

  4. (5 points) Show the bit representation for the base-10 value 63.25 in IEEE 754 single- and double-precision formats (so you will be writing down a 32-bit value and a 64-bit value). (To make your answer slightly less unreadable, you might put spaces between groups of 4 or 8 bits.) To get full credit you must show your work; I want you to actually do this problem more or less by hand rather than using a program that will just show you what's in memory for a double or float.



Footnotes

... apply).1
Credit where credit is due: I based the wording of this list on a posting to a SIGCSE mailing list. SIGCSE is the ACM's Special Interest Group on CS Education.


Berna Massingill
2018-02-19