Computer Number Representation The Sign Bit o 0 denotes a positive number; 1 denotes a negative number. o Flipping the value of this bit flips the sign of the number. 1口“4元4元t至0QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/201511/103
Computer Number Representation The Sign Bit 0 denotes a positive number; 1 denotes a negative number. Flipping the value of this bit flips the sign of the number. Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 11 / 103
Computer Number Representation The Exponent o The exponent's base is two. o Why bias??The exponent field needs to represent both positive and negative exponents Effective Exponent =Exponent stored -Bias oFor IEEE single-precision floats,the exponent field is 8 bits Bias-127. o For IEEE double-precision floats,the exponent field is 11 56,B25=1023 ”口94元4元卡重)90 Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09201512/103
Computer Number Representation The Exponent The exponent’s base is two. Why bias?? The exponent field needs to represent both positive and negative exponents. Effective Exponent = Exponent stored − Bias For IEEE single-precision floats, the exponent field is 8 bits, Bias=127. For IEEE double-precision floats, the exponent field is 11 bits, Bias=1023. IEEE reserves exponent field values of all 0s and all 1s to denote special values in the floating-point scheme. Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 12 / 103
Computer Number Representation The Exponent o The exponent's base is two. o Why bias??The exponent field needs to represent both positive and negative exponents. Effective Exponent Exponent stored-Bias For IEEE single-precision floats,the exponent field is 8 bits. Bias-127. o For IEEE double-precision floats.the exponent field is 11 bits,Bias-1023 IEEE reserves exponent field values of all 0s and all 1s to denote soecial valves in the floatina-point scneme. 1口“4元,4元t重QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 1409201512/103
Computer Number Representation The Exponent The exponent’s base is two. Why bias?? The exponent field needs to represent both positive and negative exponents. Effective Exponent = Exponent stored − Bias For IEEE single-precision floats, the exponent field is 8 bits, Bias=127. For IEEE double-precision floats, the exponent field is 11 bits, Bias=1023. IEEE reserves exponent field values of all 0s and all 1s to denote special values in the floating-point scheme. Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 12 / 103
Computer Number Representation The Exponent o The exponent's base is two. o Why bias??The exponent field needs to represent both positive and negative exponents. Effective Exponent Exponent stored-Bias For IEEE single-precision floats,the exponent field is 8 bits, Bias=127. o For IEEE double-precision floats,the exponent field is 11 bits,Bias-1023 o IEEE reserves exponent field values of all os and all 1s to denote special values in the floating-point scheme. 1口“4元,4元t重QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 1409201512/103
Computer Number Representation The Exponent The exponent’s base is two. Why bias?? The exponent field needs to represent both positive and negative exponents. Effective Exponent = Exponent stored − Bias For IEEE single-precision floats, the exponent field is 8 bits, Bias=127. For IEEE double-precision floats, the exponent field is 11 bits, Bias=1023. IEEE reserves exponent field values of all 0s and all 1s to denote special values in the floating-point scheme. Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 12 / 103
Computer Number Representation The Exponent o The exponent's base is two. o Why bias??The exponent field needs to represent both positive and negative exponents. Effective Exponent Exponent stored-Bias For IEEE single-precision floats,the exponent field is 8 bits, Bias=127. o For IEEE double-precision floats,the exponent field is 11 bits,Bias-1023. IEEE reserves exponent field values of all 0s and all 1s to denote special values in the floating-point scheme. 1口“4元,4元t重QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09201512/103
Computer Number Representation The Exponent The exponent’s base is two. Why bias?? The exponent field needs to represent both positive and negative exponents. Effective Exponent = Exponent stored − Bias For IEEE single-precision floats, the exponent field is 8 bits, Bias=127. For IEEE double-precision floats, the exponent field is 11 bits, Bias=1023. IEEE reserves exponent field values of all 0s and all 1s to denote special values in the floating-point scheme. Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 12 / 103