Class Notes (835,366)
Canada (509,138)
York University (35,229)
ITEC 1000 (85)
all (19)
Lecture

lecture_5_-_fl.docx

3 Pages
149 Views
Unlock Document

Department
Information Technology
Course
ITEC 1000
Professor
All Professors
Semester
Winter

Description
Introduction to Information Technology ITEC 1000 – Winter 2010 – Peter Khaiter Lecture 5 – Floating Point Numbers – Feb 1 Floating Point Numbers - Real numbers - Used in computer when the number o Is outside the integer range of the computer (too large or too small) o Contains a decimal fraction Format - Mantissa: stored in sign-magnitude format - Assume decimal point located at the beginning of mantissa - Exponent stored in Excess-N notation: Complementary notation o Pick middle value as offset where N is the middle value: 0..99  e.g., excess-50 Floating Point Format: Excess-50 - First digit represents the sign of mantissa o 0 is used as a “+“sign o 5 is used as a “-“sign (arbitrarily) - Two next digits represent exponent in excess-50 - Five last digits represent mantissa o Fixed decimal point located at the beginning Normalization - Shift numbers left by increasing the exponent until leading zeros eliminated - Converting decimal number into standard format o Provide number with exponent (0 if not yet specified) o Increase/decrease exponent to shift decimal point to proper position o Decrease exponent to eliminate leading zeros on mantissa o Correct precision by adding 0’s or discarding/rounding least significant digits Floating Point Calculations - Addition and subtraction o Exponent and mantissa treated separately o Exponents of numbers must agree  Align decimal points  Least significant digits may be lost o Mantissa overflow requires exponent again shifted right Multiplication and Division - Mantissas: multiplied or divided - Exponents: added or subtracted o Normalization necessary to  Restore location of decimal point  Maintain precision of the result - Adjust excess value since added twice o Example: 2 numbers with exponent = 53 represented in excess-50 notation o 53 + 53 =106 o Since 50 added twice, subtract: 106 – 50 =56 - Maintaining precision: o Normalizing and rounding multiplication IEEE
More Less

Related notes for ITEC 1000

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit