Floating Points

Floating Points - Faculty of Engineering, McMaster...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: Faculty of Engineering, McMaster University Floating Point Dr. Spencer Smith and Dr. William Farmer December 3, 2009 Smith: Floating Point (slide 1) Floating Point I Administrative Details I Motivation of the Importance of Floating Point I Decimal versus binary I Representation on integers I Representation of floating point numbers I Round-off errors I Examples I How to defend against floating point pitfalls I Format of Final Exam Smith: Floating Point (slide 2) Administrative Details I Final marked lab this week I Extra help session, Dec 14, 10:30 am, JHE/264 - bring your iClickers I will try to bring a few example questions The majority of the time will be driven by your questions Smith: Floating Point (slide 3) Floating Point Problems I Patriot missile disaster http://www.ima.umn.edu/~arnold/disasters/patriot.html I Arianne 5 rocket http://www.ima.umn.edu/~arnold/disasters/ariane.html I Sleipner A offshore platform http://www.ima.umn.edu/~arnold/disasters/sleipner.html Smith: Floating Point (slide 4) Decimal versus Binary I Base 10: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 I Base 2: 0, 1 I Position of place value specifies magnitude I (86409) 10 = 9 1 + 0 10 + 4 100 + 6 1000 + 8 10000 I (86409) 10 = 9 10 + 0 10 1 + 4 10 2 + 6 10 3 + 8 10 4 I (10101101) 2 = 1 1+0 2+1 4+1 8+0 16+1 32+0 64+1 128 = 173 I (10101101) 2 = 1 2 +0 2 1 +1 2 2 +1 2 3 +0 2 4 +1 2 5 +0 2 6 +1 2 7 = 173 Smith: Floating Point (slide 5) Binary Numbers?: iClicker What is the binary number 111 equal to in decimal? A. 8 B. 7 C. 6 D. 3 E. None of the above Smith: Floating Point (slide 6) Representation of Integers I Signed magnitude approach First bit is 0 for positive 1 for negative Most computers actually use 2s complement...
View Full Document

This note was uploaded on 02/07/2010 for the course SDF sdf taught by Professor Sdf during the Spring '10 term at Manchester IN.

Page1 / 5

Floating Points - Faculty of Engineering, McMaster...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online