Floating Point Representation Tutorial with Examples in Binary
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-1 – 1) .
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″.
Sorting in Design and Analysis of Algorithm Study Notes with Example
Follow Us On Cyber Point Solution Youtube Channel : Click Here
Follow Us on Social Platforms to get Updated : twiter, facebook, Google Plus
Learn More Ethical Hacking and Cyber Security click on this link. cyber security