{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Xxxx2 xxxx the n bits of frac minimum when 0000 m 10

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: biased value: E = exp -­‐ Bias § exp is an unsigned value ranging from 1 to 2k-­‐2 (k == # bits in exp) § Bias = 2k-­‐1 -­‐ 1 §  Single precision: 127 (so exp: 1…254, E: -­‐126…127) §  Double precision: 1023 (so exp: 1…2046, E: -­‐1022…1023) § These enable nega=ve values for E, for represen=ng very small values ¢  Significand coded with implied leading 1: M = 1.xxx…x2 §  xxx…x: the n bits of frac §  Minimum when 000…0 (M = 1.0) §  Maximum when 111…1 (M = 2.0 – ε) §  Get extra leading bit for “free” IEEE Floa-ng Point Standard University of Washington Normalized Encoding Example s E V = (–1) * M * 2 s exp frac n k ¢  Value: float f = 12345.0; §  1234510 = 110000001110012 = 1.10000001110012 x 213 (normalized form) ¢  Significand: M = frac = ¢  1.10000001110012 100000011100100000000002 Exponent: E = exp -­‐ Bias, so exp = E + Bias E = Bias = exp = ¢  13 127 140 = 100011002 Result: 0 10001100 10000001110010000000000 s exp frac IEEE Floa-ng Point Standard University of Washington Integer & Floa-ng Point Numbers ¢  ¢  ¢  ¢  ¢  ¢  ¢  ¢  Representa-on of integers: unsigned and signed Unsigned and signed integers in C Arithme-c and shiBing Sign extension Background: frac-onal binary numbers IEEE floa-ng-­‐point standard Floa-ng-­‐point opera-ons and rounding Floa-ng-­‐point in C Floa-ng Point Opera-ons University of Washington How do we do opera-ons? ¢  Unlike the representa-on for integers, the representa-on for floa-ng-­‐point numbers is not exact Floa-ng Point Opera-ons University of Washington Floa-ng Point Opera-ons: Basic Idea s E V = (–1) * M * 2 s exp frac k ¢  x +f y = Round(x + y) ¢  x *f y = Round(x * y) ¢  n Basic idea for floa-ng point opera-ons: §  First, compute the exact result §  Then, round the result to...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern