CS33-7

CS33-7 - Floating Point CS 33: Computer Organization Topic...

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

View Full Document Right Arrow Icon
CS 33: Computer Organization Topic 7: Floating Point 9/2008 John A. Rohr All Rights JAR 7-1 Floating Point
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 7: Floating Point 9/2008 John A. Rohr All Rights JAR 7-2 Number Ranges Sign and Magnitude -(2 n-1 -1) +(2 n-1 -1) Has Negative zero Ones Complement -(2 n-1 -1) +(2 n-1 -1) Has Negative zero Twos Complement -(2 n-1) +(2 n-1 -1) No Negative zero; One more – than + number
Background image of page 2
CS 33: Computer Organization Topic 7: Floating Point 9/2008 John A. Rohr All Rights JAR 7-3 Real Numbers Real numbers Integer part Fractional part Either can be zero/omitted Radix point separates Example 10 4 10 3 10 2 10 1 10 0 10 -1 10 -2 10 -3 1 2 3 4 5 . 6 7 8
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 7: Floating Point 9/2008 John A. Rohr All Rights JAR 7-4 Fixed Point Representation Many possibilities 16 Integer bits; 16 Fraction bits 24 Integer bits; 8 Fraction bits 8 Integer bits; 24 Fraction bits 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Background image of page 4
CS 33: Computer Organization Topic 7: Floating Point 9/2008 John A. Rohr All Rights JAR 7-5 Fixed Point Problem Must choose one representation Will not work for all situations Would like to be able to move the binary point to different places for different situations Still limited by available range Only 2 n possible distinct values Not enough for real-world problems
Background image of page 5

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

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 7: Floating Point 9/2008 John A. Rohr All Rights JAR 7-6 Scientific Notation One digit before the decimal point Multiplication by a power of 10 Example 12345.678 = 1.2345678 x 10 4 Can also be used with binary Example 1011.1101 = 1.0111101 x 2 3
Background image of page 6
CS 33: Computer Organization Topic 7: Floating Point 9/2008 John A. Rohr All Rights JAR 7-7 Floating Point Representation Can represent a large range of numbers Maximizes use of available bits Based on binary numbers written in scientific notation Three separate parts Sign Normalized value Exponent
Background image of page 7

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

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 7: Floating Point 9/2008 John A. Rohr All Rights JAR 7-8 Floating Point Fields Sign 0 for positive; 1 for negative Independent of other bits Exponent Power of 2 – Biased by 127 10 (SP) or 1023 10 (DP) Mantissa Normalized value Leading 1-bit is omitted Zero is a special case: All zero bits
Background image of page 8
CS 33: Computer Organization Topic 7: Floating Point 9/2008 John A. Rohr All Rights
Background image of page 9

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

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

This note was uploaded on 07/20/2009 for the course CS 33 taught by Professor Rohr during the Fall '08 term at UCLA.

Page1 / 49

CS33-7 - Floating Point CS 33: Computer Organization Topic...

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

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