l14 - Real Numbers How do we represent real numbers Several...

Info iconThis preview shows pages 1–7. 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

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

View Full DocumentRight 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: Real Numbers How do we represent real numbers? Several issues: • How many digits can we represent? • What is the range? • How accurate are mathematical operations? • Consistency... Is a + b = b + a ? Is ( a + b ) + c = a + ( b + c ) ? Is ( a + b )- b = a ? Real Numbers How do we represent real numbers? Several issues: • How many digits can we represent? • What is the range? • How accurate are mathematical operations? • Consistency... Is a + b = b + a ? Is ( a + b ) + c = a + ( b + c ) ? Is ( a + b )- b = a ? Fixed Point Basic idea: 0 1 0 0 1 0 1 0 radix point is here Choose a xed place in the binary number where the radix point is located. For the example above, the number is (010 . 01010) 2 = 2 + 2- 2 + 2- 4 = (2 . 3125) 10 How would you do mathematical operations? Floating-Point Some problematic numbers.... 6 . 023 × 10 23 6 . 673 × 10- 11 6 . 62607 × 10- 34 Scientic computations require a number of digits of precision... But they also need range ⇒ permit the radix point to move ⇒ oating-point numbers Floating-Point: Scientic Notation sign 6.023 x 10 23 exponent mantissa radix (base) + • Number represented as: – mantissa, exponent • Arithmetic – multiplication, division: perform operation on mantissa, add/subtract exponent – addition, subtraction: convert operands to have the same exponent value, add/subtract mantissas Fixed Point Basic idea: 0 1 0 0 1 0 1 0 radix point is here Choose a xed place in the binary number where the radix point is located.radix point is located....
View Full Document

Page1 / 22

l14 - Real Numbers How do we represent real numbers Several...

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

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