Java Primitive Data Types -Floats key

IEEE (Institute of Electronics and Electrical Engineers) Standard 754

  1. Convert the following base 10 decimals to binary.
  1. 0.1 = 0.0001 1001 1001 1001 1001 1001 1001 1000
  2. 0.2
  3. -0.25
  4. -0.5
  5. 8.125
  1. Convert the binary numbers in 1. to 1-plus normalized base 2 representation with exponent E written in excess-127 format: N = ± (1.b1b2b3 ...b23 )2 x 2+E (Round b23 based on b24.)
  1. 1.1001 1001 1001 1001 1001 101 x 100111 1011

  2.  

  3.  

  4.  

  5.  


The Java primitive data type float is 4 bytes, or 32 bits:

1 bit Sign

8 bit exponent

23 bit mantissa

  1. Write your 1-plus normalized base 2 representation with excess-127 exponent as a java float (rounded) and as an 8-digit hexadecimal.
  1. 0011 1101 1100 1100 1100 1100 1100 1101
    3DCCCCCD
  2.  

  3.  

  4.  

  5.