Wednesday, 15 June 2011

How does 2.0 + 3.0 = 4.0 using a 5-bit floating point representation based on the IEEE format and round-to-even? -



How does 2.0 + 3.0 = 4.0 using a 5-bit floating point representation based on the IEEE format and round-to-even? -

i confused how 2.0 + 3.0 = 4.0 when rounding-to-even ieee-based format of representing floating point numbers.

http://imgur.com/1v69grm

specifically lastly part. sec lastly 1 confusing.

could please have explanation? thanks!

2.0 represented 1.0 e 1 (1 * 2^1) (i'm writing mantissas in base of operations 2.)

3.0 represented 1.1 e 1 (3/2 * 2^1)

adding them together, unnormalized mantissa of 10.1, gets normalized 1.01, , exponent becomes 2^2. because there room represent 1 decimal place of mantissa, have selection between using 1.0 , 1.1 mantissa, , round-to-even says take "even" mantissa, gets 1.0 e 2 (1 * 2^2, or 4.0).

floating-point ieee

No comments:

Post a Comment