HunanUniversity第2章信息的表示和处理浮点数计算机组成与结构2016年4月主讲教师赵欢******@:FloatingPointBackground:FractionalbinarynumbersIEEEfloatingpointstandard:DefinitionExampleandpropertiesRounding,addition,?Sumof?2i2i-14211/21/41/82-jbibi-1•••b2b1b0b-1b-2b-3•••b-j•••FractionalBinaryNumbersRepresentationBitstorightof“binarypoint”representfractionalpowersof2Representsrationalnumber:•••?FractionalBinaryNumbers:ExamplesValue Representation 53/4 27/8 (unsigned)…+1/4+1/8+…+1/2i+…➙–εRepresentableNumbersLimitation#1Canonlyexactlyrepresentnumbersoftheformx/2kOtherrationalnumbershaverepeatingbitrepresentationsValue Representation1/3 [0101]…21/5 [0011]…21/10 [0001]…2Limitation#2JustonesettingofdecimalpointwithinthewbitsLimitedrangeofnumbers(verysmallvalues?verylarge?)Today:FloatingPointBackground:FractionalbinarynumbersIEEEfloatingpointstandard:DefinitionExampleandpropertiesRounding,addition,aseAnalysisExample: mantissa(尾数)exponent(阶码、指数) (base,基)°Normalizedform(规格化形式):小数点前只有一位非0数°同一个数有多种表示形式。例:对于数1/1,000,000,000•Normalized(唯一的规格化形式):-9•Unnormalized(非规格化形式不唯一):-8,-10科学计数法(otation)与浮点数mantissa(尾数)exponent(指数)-10 binarypoint基为2forBinaryNumbers:只要对尾数和指数分别编码,就可表示一个浮点数(即:实数)浮点数的表示°Normalformat(规格化数形式):+/-×MExponent°32-bit规格化数:310SExponentFraction1bit?bits?bitsS是符号位(Sign)Exponent(E)用移码来表示Fraction(M)表示xxxxxxxxxxxxx,尾数部分(基可以是2/4/8/16,计算机内约定为2,无需显式表示)°早期的计算机,各自定义自己的浮点数格式问题:浮点数表示不统一会带来什么问题?
计算机组成与结构04-浮点数 来自淘豆网www.taodocs.com转载请标明出处.