Download presentation
Presentation is loading. Please wait.
Published byAugustus Patrick Modified over 8 years ago
1
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.7 Instructor: Lin Chen Sept 2013
2
1.7 Storing Fractions 1 Data Storage Floating-Point Notation Truncation Errors Pearson Custom: Computer Science, Data Representation and Machine Concepts
3
Floating-Point Notation 1.6 Storing Fractions Use 8 bits to represent the float number 01 10 10 1 1 Sign bit 0, nonnegative 1, negative Exponent Mantissa Excess Notation
4
Floating-Point Notation 1.6 Storing Fractions Convert floating-point notation to decimal floating number 01 01 10 1 1 20.1011 +10.11 2.75
5
Floating-Point Notation 1.6 Storing Fractions Questions: Convert 8 bits floating-point notation 00111100 to decimal floating number
6
Floating-Point Notation 1.6 Storing Fractions Convert decimal floating number to binary floating number with 8 bit floating-point notation 10 0 1 1.125 1.001 1.001 to 0.1001, shift 1 101
7
Floating-Point Notation 1.6 Storing Fractions Convert decimal floating number to binary floating number with 8 bit floating-point notation 1 0 0 1 1.125 1.001 1.001 to 0.1001, shift 1 101 0 10 1
8
Floating-Point Notation 1.6 Storing Fractions Normalized Form 1 0 1 0 1.01 1 0 1 Starting with the leftmost
9
Truncation Errors 1.6 Storing Fractions Convert 2.625 to floating-point notation
10
Truncation Errors 1.6 Storing Fractions Calculate 2.5 + 0.125 + 0.125
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.