Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CNIT 17600 - Intro Computer Architecture 

Floating Point Lab

Questions

Question 1.

a.  Convert the decimal number 1439878.97234x1012  to the format SEEMMMM with the exponent stored excess-55. The implied decimal point is to the right of the rst mantissa digit.   Use the standard 0 for positive numbers and  1 for negative.   Note carefully the number of digits in the mantissa.

b. What is the smallest number (i.e. closest to zero) you can use with this format before underflow occurs? There should be a positive and a negative version of this smallest num- ber.

c.   What is the largest number  (i.e.   furthest away from zero) you can use with this format before overflow occurs?  There should be a positive and a negative version of this largest number.

Question 2.

a. Convert the decimal number −0.00000007003755464x10 21  to the format                      SEEMMMMMM with the exponent stored excess-25. The implied decimal point is at the start of the mantissa.  Use the standard 0 for positive numbers and 1 for negative.  Note carefully the number of digits in the mantissa.

b. What is the smallest number (i.e. closest to zero) you can use with this format before underflow occurs? There should be a positive and a negative version of this smallest num- ber.

c.   What is the largest number  (i.e.   furthest away from zero) you can use with this format before overflow occurs?  There should be a positive and a negative version of this largest number.

Question 3.

a. Convert the decimal number 29182818284 to oating point. Use the format                  SEEMMMMM. All digits are decimal. The exponent is being stored excess-49 (not excess- 50).   The implied decimal point is at the  beginning  of the mantissa.   The sign is 0 for a positive number, 1 for a negative number.  Note carefully the number of digits in the mantissa.

b. What is the range of numbers that can be stored in this format?

c. What is the oating point representation for −28182818284?

d. What is the oating point representation for 0.0000029182818284?

Question 4.

Given the IEEE-754 Single Precision Floating Point number (stored Excess-127) 011111010101011000000000000000002, determine the following:

a.The sign of the mantissa

b.The magnitude of the exponent (convert to base 10)

c.The sign of the exponent

Question 5.

Given the IEEE-754 Single Precision Floating Point number (stored Excess-127) 101111010101011000000000000000002, determine the following:

a.The sign of the mantissa

b.The magnitude of the exponent (convert to base 10)

c.The sign of the exponent

Question 6.

Using an online conversion calculator, find the mantissa values of the IEEE-754 Single Precision Floating Point numbers from Questions 4 & 5

Question 7.

IEEE oating point numbers will occasionally yield incorrect math results when used in computer programs.  Using your Raspberry Pi, open the interpreter by typing the word python in the command line. You will get a prompt that shows >>>. Start, for example, with

>>>  0 .1+0 .1

Then try something like

>>>0 .1+0 .2

>>>0 .1+0 .7

>>>0 .3+0 .6

>>>0 .2+0 .7

What happened when you tried to sum these pairs of numbers?  Summarize these results in a table.  Explain why this happened.  Use lecture notes and other resources to nd the cause of this phenomenon.

Extra credit is available if you can nd additional examples of this phenomenon in Python on the Raspberry Pi.

Submission of answers

Type your answers in a separate document. Be sure to submit in pdf format to Blackboard. Due in one week.