Simulating Computer
Arithmetic Hardware
The
purpose of this assignment is to gain a better understanding of the operation
of computer arithmetic circuits by constructing working models using a publicly
available logic simulator. We will explore circuits that perform basic
arithmetic operations on integer and floating-point numbers.
The
logic simulator I am asking you to use in carrying out this assignment is Logisim, written by Carl Burch.
It can run on any computer with a Java Virtual Machine installed. The latest
Windows version can be downloaded here. The program may be run
directly without any complex installation or uninstallation process. I
recommend that you first familiarize yourself with its operation by building
some small combinational and sequential logic circuits before proceeding to the
following assignment.
Assignment(Due Thursday, March 6 by
5:00 p.m.):
Part
A: Construct
a circuit that will multiply two 8-bit signed binary integers in two's
complement format, producing a 16-bit signed result. For this part of the
assignment you may use any of the basic logic gates, multiplexers, flip-flops,
registers, etc. available in Logisim or its standard libraries, but you may not
use the multiplier from the Arithmetic library. Using a ROM from the Memory
library is also not allowed. (Pre-computing results and storing them in a
lookup table for later access is a legitimate design technique in some
situations, but it would bypass the main point of this assignment which is to
understand the inner workings of arithmetic circuits.) Your multiplier may use
all combinational logic, or a mix of combinational and sequential logic. When you
have a completed implementation, test it by providing several pairs of numbers
as inputs. Make sure you thoroughly exercise the circuit by using all
combinations of positive and negative operands, both large and small numbers as
operands (including positive and negative boundary cases), one or both operands
equal to zero, etc. (This way there will be no surprises when I test your
submitted circuit on my own machine.)
Part
B: Now
construct a circuit that will multiply a pair of numbers in IEEE-754 single precision
floating-point format. This time, it is OK to use the built-in integer
multiplier function from Logisim's Arithmetic library to do the actual
multiplication of the significands; but you will still need to figure out and
build in the logic to un-bias, add, and re-bias exponents as needed, normalize
the product and adjust the exponent, etc. to produce the final result in
IEEE-754 format. As in Part A, once you have your floating-point multiplier
circuit constructed, test it with a variety of positive and negative, small
(much less than 1) and large numbers, and zero, as inputs. (To keep things more
manageable, you do not have to make the circuit handle NaNs,
denormalized numbers, or positive/negative infinity; it only has to work for
normalized real numbers and positive/negative zero.)
To
Turn In:
Each student must submit a report (in .doc, .docx, or .pdf format) including a
thorough description of each circuit and at least a top-level circuit diagram.
More detailed diagrams of lower-level circuit components are encouraged if they
help to explain the circuits' operation. Also include tables of the test data
you used to evaluate each circuit and the results obtained in each case. Analyze
and discuss your results, noting anything unusual or unexpected about the
design or operation of the circuits. (If you had the assignment to do over
again, would you have done anything differently? Were there any ways you could
have made your circuit[s] perform better or more efficiently?) Each student
must also submit all Logisim project (.circ) files comprising each circuit.
This will allow me to verify the operation of your circuits on my own machine. Good
luck and have fun!
No comments:
Post a Comment