Converting 1.375, -571.3125, 0.041015625, and 4091.125 from decimal to 32 bit floating point numbers:
Converting 1.375 to 32 bit floating point number: 1.375 is not negative, so the sign bit is 0b. The whole number is 1, so we will convert that to binary. 1 = 1b, so the whole number is 1b. The fraction is 0.375. We can iteratively multiply by two to expose a bit. 2 * 0.375 = 0.75, so the fraction is now 0. 2 * 0.75 = 1.5, so the fraction is now 01. 2 * 0.5 = 1.0, so the fraction is now 011. We can represent the decimal number in binary as: 1.011b. In exponential notation, this number is 1.011 x 2^0.
In conclusion, the sign bit is 1, the fraction without implied 1 is 011, and the exponent field is 127 + 0 = 127 = 1111111b. The final 32 bit floating point number is:
0 01111111 01100000000000000000000
s exp fraction
Converting -571.3125, we first note that the sign bit will be flipped on. The sign bit is 1b. Then, we convert both the whole number and the fraction into binary form. For the whole number 571, we can see that the number in binary is 10111011b. For the fraction part 0.3125, we can iteratively multiply by 2 in order to peel off the binary digits. Performing that iteration: 2 * 0.3125 = 0.6250, so the fraction binary number is currently 0b. Then, 2 * 0.6250 = 1.25, so the fraction binary number is currently 01b. Then, 2 * 0.25 = 0.5, so the fraction binary number is curretnly 010b. Finally, 2 * 0.5 = 1.0, so the bit pattern for the fraction is 0101b. The new form of the decimal number is 10111011.0101b. Written in exponential notation, the number is 1.01110110101b * 2^7.
In conclusion, the sign bit is 1, the fraction without implied 1 is 01110110101b, and the exponent field is 127 + 7 = 134 = 10000110b. The final 32 bit foating point number is
1 10000110 01110110101000000000000
s exp fraction
note Skipping 0.041015625 and 4091.125.