CS137-lecture-20210202

CSc 137 Presentation -Topics-1-1.docx

IMAGE IMAGE

How to convert 5.375 to a floating point representation using IEEE 754:

  1. Convert the number to a binary representation Start with the whole part: 5 101 Then do the fractional part: .375 Using successive multiplication \[0.375 * 2 = 0 + .75 \\ 0.75 * 2 = 1 + .5 \\ 0.5 * 5 = 1 + .0 \] So .375 = .011 So 5.375 = 101.011 in fixed point
Continued on next lecture