Spring CSCI 320 Homework 5

This assignment should be turned in either class or lab on 6 March or uploaded to the homework 5 moodle page by 5:40 PM of that day.

Reading

In the textbook, section 5.2.6 covers array multipliers, section 5.2.7 covers array dividers, and section 5.3.2 covers IEEE 754 floating-point representation. Carefully read these sections, from pages 252 to 259, before attempting these problems. We didn’t cover array dividers in class, but they are close enough to array multipliers that you should be able to work that to do the problem after reading section 5.2.7.

Problem 2

In this problem assume that two different pairs of four-bit numbers are being both multiplied and divided. This means there are four different computations going on. The list below gives those four computations and their results.

Show how these calculations are made by writing on every one of the lines in the following figures, taken from the textbooks, the values that will be contained for those four combinations of operands and operations.

Here are the four combinations in a table you can print out.

1010 multiplied by 0011 gives 0011110 as the product
Figure 5.18, p 252 Digital Design and Computer Architecture Harris & Harris
1110 multiplied by 0110 gives 1010100 as the product
Figure 5.18, p 252 Digital Design and Computer Architecture Harris & Harris
1010 divided by 0011 gives 0011 as the quotient and 0001 as the remainder
Figure 5.20, p 254 Digital Design and Computer Architecture Harris & Harris
1110 divided by 0110 gives 0010 as the quotient and 0010 as the remainder
Figure 5.20, p 254 Digital Design and Computer Architecture Harris & Harris

You might find the following picture of the the divider element more useful than the one in the textbook.
dividerelement with clearer D output

Problem 2

Convert the following floating point numbers into 32-bit IEEE 754 format. One of these will not be exact, but get as close as you can.

Problem 3

Convert the following 32-bit IEEE 754 floating point numbers, expressed in hexadecimal, into a Java floating point number.