1 / 10

Computer SCIENCE

Data Representation and Machine Concepts. Computer SCIENCE. Section 1.7. Instructor: Lin Chen. Sept 2013. 1 Data Storage. 1.7 Storing Fractions. Floating-Point Notation Truncation Errors. Pearson Custom: Computer Science, Data Representation and Machine Concepts.

didier
Download Presentation

Computer SCIENCE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Representation and Machine Concepts Computer SCIENCE Section 1.7 Instructor: Lin Chen Sept 2013

  2. 1 Data Storage 1.7 Storing Fractions Floating-Point Notation Truncation Errors Pearson Custom: Computer Science, Data Representation and Machine Concepts

  3. 1.6 Storing Fractions Floating-Point Notation Use 8 bits to represent the float number 1 1 0 1 1 0 1 0 Mantissa Sign bit Exponent Excess Notation 0, nonnegative 1, negative

  4. 1.6 Storing Fractions Floating-Point Notation Convert floating-point notation to decimal floating number 1 1 0 1 1 0 0 1 2 0.1011 2.75 +10.11

  5. 1.6 Storing Fractions Floating-Point Notation Questions: Convert 8 bits floating-point notation 00111100 to decimal floating number

  6. 1.6 Storing Fractions Floating-Point Notation Convert decimal floating number to binary floating number with 8 bit floating-point notation 1.001 1.125 1 0 1 0 1.001 to 0.1001, shift 1 101

  7. 1.6 Storing Fractions Floating-Point Notation Convert decimal floating number to binary floating number with 8 bit floating-point notation 1.001 1.125 1 1 1 0 1 0 0 0 1.001 to 0.1001, shift 1 101

  8. 1.6 Storing Fractions Floating-Point Notation Normalized Form 1.01 Starting with the leftmost 0 1 1 0 1 1 0

  9. 1.6 Storing Fractions Truncation Errors Convert 2.625 to floating-point notation

  10. 1.6 Storing Fractions Truncation Errors Calculate 2.5 + 0.125 + 0.125

More Related