From float or double to int the value will be

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: numeric value is therefore Î ¾ ¾ ½ ·¾. The value ½ ¼ has a bit representation with all but the most significant bit of the exponent field equal to 1 and all other bits equal to 0. Its significand value is Å ½ and its exponent value is ¼. The largest normalized value has a bit representation with a sign bit of 0, the least significant bit of Ò , giving the exponent equal to 0, and all other bits equal to 1. It has a fraction value of ½ ¾ Ò (which we have written ¾ ¯). It has an exponent value ½ ½, a significand Å ¾ ¾ ¾ Ò µ ¢ ¾¾ ½ ½ ´½ ¾ Ò ½ µ ¢ ¾¾ ½ . giving a numeric value Î ´¾ ¾ Practice Problem 2.26: A. For a floating-point format with a -bit exponent and an Ò-bit fraction, give a formula for the smallest positive integer that cannot be represented exactly (because it would require an Ò · ½-bit fraction to be exact). , Ò ¾¿)? B. What is the numeric value of this integer for single-precision format ( 2.4.4 Rounding Floating-point arithmetic can only approximate real arithmetic, since the representation has limited range and precision. Thus, for a value Ü, we generally want a systematic method of finding the “closest...
View Full Document

Ask a homework question - tutors are online