CSCI 235 — Section 2.4

Either give me a copy of your problems in class or lab before during the first week of October or upload to the Section 2.4 moodle page by 11:55 PM 6 October.

CMU 15-215 Video to view

Stuff to do

  1. Convert the following numbers from standard decimal to Q6.6 (fixed point — 6 integer and 6 fraction bits)
    • 3.3
    • 5.375
    • -25.25
  2. Convert the following numbers from Q3.3 (fixed point — 3 integer and 3 fraction bits) to standard decimal
    • 010010
    • 100010
    • 111111
  3. Convert the following decimal numbers into IEEE 754 single precision (Java float) representation. Express your result in hexadecimal.
    • 0.25
    • 7.7
    • -1024.000000000
    Yes, there are many on-line IEEE 754 conversion tools (use Google) that do this for you or you can even start up Processing or NetBeans make a call to Float.floatToIntBits(); however, at least use the course data representation spreadsheet to view the raw bits.
  4. Convert the following IEEE 754 single precision numbers, represented in hexadecimal, into the corresponding Java float.
    • 0x80650000
    • 0xBF000000
    • 0x44400000
    Again, use the course data representation spreadsheet to see how these bits are used.