# 05 - Lecture 5 Todays class Representations of numbers in...

This preview shows pages 1–6. Sign up to view the full content.

Lecture 5 Today’s class: Representations of numbers in different bases Floating-point numbers & machine representations Arithmetic with floating-point numbers Material on floating-point numbers, machine arithmetic, and rounding errors introduces many extremely technical subtleties. Unfortunately, it is often required (even for non- computer scientists) to understand these technicalities as consumers of numerical software! Taylor’s theorem and truncation errors (next time)

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

View Full Document
Representations of numbers XLIII × XXXVII MDXCI 43 × 37 301 1290 1591
Decimal representations Recall: 71 . 32 actually means 7 1 . 3 2 = 7 · 10 + 1 · 1 + 3 10 + 2 100 = 7 · 10 1 + 1 · 10 0 + 3 · 10 - 1 + 2 · 10 - 2 7 tens + 1 unit + 3 tenths + 2 one hundredths integer part = 71 , fractional part = 0 . 32 Positional notation needs digit zero & decimal point Decimal system favoured by most modern humans

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

View Full Document
Floating-point format Floating-point format : scientific notation Normalised: shift decimal point ( × powers of 10) - 1 . 3701542 · 10 3 = - 1370 . 1542 9 . 376 · 10 - 7 = 0 . 0000009376 Terminology: if x = s · 10 e = ( a 0 .a 1 a 2 . . . a t ) 10 · 10 e s = ( a 0 .a 1 a 2 . . . a t ) 10 = significand f = (0 .a 1 a 2 . . . a t ) 10 = mantissa (fraction) t = precision = # digits in mantissa e = exponent of base b = 10
Different number systems Different civilisations used different numeral bases Number systems distinguished by numerals

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern