Floating Point Representation

for numbers too large or too small
number is represented approx to fixed number of significant digits and
scaled using exponent
way to represent scientific numbers

A floating point number consist of
1) significand mantissa or coefficient signed digit string.
significand length determines to which precision number can be
represented, prportional to accuracy.

2)a signed integer exponent scale factor proportional to range, more
bits to the exponent means more range

|---|--------------|---------------------|
|---|--------------|---------------------|
sign(1bit) E(8bit) Significand(23bit)

Figure above bit floating point Format
S*B^e

B is bias, implicit, same for all numbers. bias value is typically 2^e-1 - 1
radix point is assumed to be after MSB bit of signigicand
advantage of biased representation is that non negative floating point
numbers can be treated as integers for comparison purpose
 
sign: 0 positive, 1 negative

exponent: stored in biased form, that is, bias is subtracted from the
field to get true exponent
exponent is 8 bits means number from 0 to 255 with bias it becomes
-127 to +128.

Significand: stored in normalized form, msb should be one and radix
point should be after msb
msb one is taken as implicit and need not be stored, so 23 bit of
significand can represnt 24 bits.




IEEE 754 floating point standard
single precision: 1 bit sign, 8 bit exponent, 23 bit fraction (24 bit
significand = 1+ fraction) (“1” is implied)
double precision: 1 bit sign, 11 bit exponent, 52 bit fraction (53 bit
significand).


Fractional portion of the significand represents a fraction between 0 and
1 (each bit from left to right has weight 2-1, 2-2, H)
Since 0 has no leading 1, it is given the reserved exponent value 0 so
that hardware won’t attach a leading 1 to it

Exponent is “biased” (biased notation) to make sorting easier
all 0s is smallest exponent (most negative) all 1s is largest (most
positive)

bias of 127 for single precision and 1023 for double precision
(–1)sign× (1 + fraction) × 2^(exponent – bias)

Exponent and mantissa of all zeros and ones are special values
  Ads:
  Let's Take A Look best Online Mega Store eBay and Amazon. 

0 comments: