26
Many of the slides in this lecture are either from or adapted from slides provided by the authors of the textbook “Computer Systems: A Programmer’s Perspective.” 2 nd Edition and are provided from the website of Carnegie-Mellon University, course 15-213, taught by Randy Bryant and David O’Hallaron in Fall 2010. These slides are indicated “Supplied by CMU” in the notes section of the slides.

Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Many of the slides in this lecture are either from or adapted from slides provided by the authors of the textbook “Computer Systems: A Programmer’s Perspective.” 2nd Edition and are provided from the website of Carnegie-Mellon University, course 15-213, taught by Randy Bryant and David O’Hallaron in Fall 2010. These slides are indicated “Supplied by CMU” in the notes section of the slides.

Page 2: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 3: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 4: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 5: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 6: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 7: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

On x86 hardware, all floating-point arithmetic is done with 80 bits, then reduced to either 32 or 64 as required.

Page 8: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 9: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 10: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 11: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 12: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 13: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 14: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 15: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 16: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 17: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron
Page 18: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 19: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 20: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Note that to compute E, one must first convert exp1 and exp2 to E1 and E2, then add them them together and check for underflow or overflow (corresponding to -∞ and +∞), and then convert to exp.

Page 21: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 22: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Supplied by CMU.

Page 23: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

III–23

Page 24: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron

Note that the floating-point numbers in this and the next two slides are expressed in base 10, not base 2.

Page 25: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron
Page 26: Many of the slides in this lecture are either from or adapted from …cs.brown.edu/courses/csci0330/lecture/XXFPdatarep.pdf · 2016-11-20 · by Randy Bryant and David O’Hallaron