EE357Unit3_FP_Notes

EE357Unit3_FP_Notes - Floating Point Point Used to...

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

View Full Document Right Arrow Icon
E 357 Unit 3 EE 357 Unit 3 IEEE 754 Floating Point Representation Floating Point Arithmetic © Mark Redekopp, All rights reserved loating Point Floating Point sed to represent very small numbers Used to represent very small numbers (fractions) and very large numbers – Avogadro’s Number: +6.0247 * 10 23 g – Planck’s Constant: +6.6254 * 10 -27 – Note: 32 or 64-bit integers can’t represent this range • Floating Point representation is used in HLL’s like C by declaring variables as float or double © Mark Redekopp, All rights reserved ixed Point Fixed Point nsigned and 2’s complement fall under a Unsigned and 2s complement fall under a category of representations called “Fixed Point” • The radix point is assumed to be in a fixed p location for all numbers – Integers: 10011101. (binary point to right of LSB) • For 32-bits, unsigned range is 0 to ~4 billion – Fractions: .10011101 (binary point to left of MSB) •R a nge [0 to 1) • Main point: By fixing the radix point, we limit the range of numbers that can be represented © Mark Redekopp, All rights reserved – Floating point allows the radix point to be in a different location for each value loating Point Representation Floating Point Representation imilar to Similar to _____________________ loating Point representation uses the • Floating Point representation uses the following form – 3 Fields: ________, ____________, ___________________ © Mark Redekopp, All rights reserved
Background image of page 1

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

View Full DocumentRight Arrow Icon
ormalized FP Numbers Normalized FP Numbers • Decimal Example p • In binary the only significant digit is ________ • Thus normalized FP format is: • FP numbers will always be normalized before being _________________________ – Note: © Mark Redekopp, All rights reserved EE Floating Point Formats IEEE Floating Point Formats ingle Precision ouble Precision Single Precision (32-bit format) – 1 Sign bit Double Precision (64-bit format) – 1 Sign bit – ___ Exponent bits using _____________ presentation – ___ Exponent bits using ____________ presentation representation – ___ Fraction bits quiv. Decimal Range: representation – ___ Fraction bits quiv. Decimal Range: Equiv. Decimal Range: 7 digits x 10 ±38 Equiv. Decimal Range: 16 digits x 10 ±308 © Mark Redekopp, All rights reserved S fraction Exp. S fraction Exp. xponent Representation Exponent Representation •E xponent includes its own sign (+/-) 2’s Excess • Rather than using 2’s comp. system, Single-Precision uses Excess-127 hile Double- recision uses comp. -127 -1 1111 1111 +128 -2 1111 1110 +127 while Double Precision uses Excess-1023 – This representation allows FP numbers to e easily compared -128 1000 0000 1 +127 0111 1111 0 be easily compared • Let E’ = stored exponent code and E = true exponent value or single recision: E’=E+127 +126 0111 1110 -1 For single-precision: E = E + 127 –2 1 => E = 1, E’ = 128 10 = 10000000 2 • For double-precision: E’ = E + 1023 +1 0000 0001 -126 0 0000 0000 -127 Comparison of © Mark Redekopp, All rights reserved -2 => E = -2, E’ = 1021 10 = 01111111101 2 2’s comp. & Excess-N Q: Why don’t we use Excess-N more to represent negative #’s xponent Representation Exponent Representation P formats FP formats _______________ _______________ E’ (range of 8-bits shown) E (E = E’-127) _______________ _______________ • Thus, for single- precision the range f exponents is of exponents is _______________ © Mark Redekopp, All rights reserved
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/04/2010 for the course EE 357 taught by Professor Mayeda during the Spring '08 term at USC.

Page1 / 12

EE357Unit3_FP_Notes - Floating Point Point Used to...

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