Representation of Numbers on PC/Linux and Vax Computers
Goals:This laboratory has the following purposes:
-
To develop an expanded understanding of the storage of
numeric data on both the PC/Linux and Vax computers through experimentation,
- To clarify integer data type,
- To give students experience with real data type, and
- To allow for comparison of the storage of numeric data on
both the PC/Linux and Vax computers (both of which are 32-bit machines).
Preparation Before the laboratory session, write binary patterns for
-
integers ± 1, ± 2, ± 3, ± 6, ± 9 using
sign/magnitude notation, ones complement notation, and twos complement
notation, and
-
real numbers ± 1.0, ± 2.0, ± 3.0, and 4.0, 5.0, ..., 11.0 .
In the Laboratory:
Work to be turned in:
Your lab write-up should contain both your computations from the lab
preparation and your results from the lab itself. Further, you should
document how both negative integers and real numbers are stored in both the
PC/Linux and Vax computers based on your experiments in the lab.
Finally, you should compare how the two machines store numbers. Are the
storage algorithms the same? If so, justify your conclusions. If not,
explain how the storage is different.
This document is available on the World Wide Web as
http://www.cs.grinnell.edu/~walker/courses/211.fa01/labs/lab.data-rep.html