This page needs your browser to be able to use JavaScript.
Use Netscape Navigator 4.0 (or above), on 32-bit systems such as Unix Solaris or Windows 95 or NT,
go to Options.Network Preferences.Languages and enable Java and JavaScript.

Use Netscape 4.0 or above to make this page work.

Tutorial Exercise 3.2: floats - using the IEEE 754 storage format

There are two exercises here: Use pencil and paper to do calculations, if you want to.
Ask your tutor for help, if necessary.

1. Storing float numbers in the IEEE 754 single-precision format

Press the RANDOM DECIMAL button to get a simple-to-store decimal number.
Follow the steps to find the hex representation of the storage of this number:
               
Give the equivalent bicimal representation of this number:
   Step 1:     
Now give just the mantissa for the normalised form of this bicimal, entering it as an unsigned binary value:
   Step 2:     
Now enter the exponent for the normalised form of the bicimal, entering the sign, + or -, and the unsigned binary integer value of the exponent:
   Step 3:          
Now input how the sign is stored as a single bit:
   Step 4:            
Now input the IEEE 754 binary storage pattern for the number, finishing with the right-most 1 (the rest of the storage will be filled with 0's for you if you are correct):
   Step 5:     
Finally, show how the 32-bit binary storage can be represented by 8 Hex digits:
   Step 6:      


2. Finding the float decimal value when given the storage in hex

Press the RANDOM STORAGE button to get the hex storage form of a simple-to-store decimal number.
Follow the steps to find the decimal value of this stored float number:
               
Now input the binary equivalent for the first four hex digits in this storage (the last four hex digits will always be 0 for this exercise, so they will be filled in for you if you input the correct binary for the first four hex digits):
   Step 1:     
Give the sign of the stored decimal by entering + or -:
   Step 2:            
Enter the eight bits storing the exponent:
   Step 3:            
Now enter the exponent as a signed decimal value:
   Step 4:            
Give the normalised mantissa in binary, inserting the initial 1. and ending with the final 1 :
   Step 5:            
Finally, give the complete, original, signed decimal number:
   Step 6: