CS314

Homework 1: Floating Point Representation

Questions:

1. Find out what is the representation for a double in memory in the SPARC/X86 and describe it (Hint: Use google or see IEEE_754-1985).

2. Using the information you found in 1, find out the decimal representation of the following double numbers in binary. IMPORTANT show how you came up with the results.


a)  01000000 00001000 00000000 00000000 00000000 00000000 00000000 00000000
 

b) 11000000 01011111 01000000 00000000 00000000 00000000 00000000 00000000
 

c) 00111111 11010101 00011110 10111000 01010001 11101011 10000101 00011111
 

d) 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 

e) 00111111 11110000 00000000 00000000 00000000 00000000 00000000 00000000
 

3. Convert the following numbers in decimal to binary in the SPARC/X86 representation.

a) 1.456

b)456.235

4. What is the largest number and the smallest positive number different than 0 that you can represent with a double.

Turning in your homework.

Bring a printout of your homework to class on Thursday June 20th. Include both the questions and the answers.

E-mail your questions to cs314-ta