Handbook of Computer Science(cs) and IT

 

Floating Point Representation

A floating point number can be represented using two points. First is called mantissa (m) and other one is exponent (e). Thus, in a number system with base r, a floating point number with mantissa m and exponent e will be represented as (m x  re).

 

 

 

The value of m may be a fraction or an integer. Thus, a number (2 .25)10 can represented as 0.225  x  10′.

Here,                                              m = 225 and e = 1, r = 10.

 

For n bit register, MSB will be sign bit and (n – 1) bits will be magnitude. so, positive largest number that can be stored is (2n-1 – 1) and negative lowest number is – (2n-11) .

 

Actual Number Finding Technique

Here, we always store exponent in positive. Biased number is also called excess number. Since, exponent is stored in biased form, so bias number is added to the actual exponent of the given number. Actual number can be calculated from the contents of the registers by using following formula

Actual number          =            (-1)s (1 + m) x 2e-Bias

S = Sign bit

m = Mantissa value of register

e = Exponent value of register

Bias = Bias number of n bits used to represent exponent. then Bias number = (2n-1 – 1)

Range of exponent = – (2k-1 -1) to 2“.

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95

Leave a Reply

Your email address will not be published. Required fields are marked *