Docsity

Computer Architecture and Organization - Floating Point Numbers, Study notes of Computer Architecture and Organization

Partial preview of the text

Download Computer Architecture and Organization - Floating Point Numbers and more Study notes Computer Architecture and Organization in PDF only on Docsity!

Unit-2: Floating Point Numbers

Recap

Session Objectives & Teaching Learning

Material

Session Plan

 Introduction  Floating point Representation  Examples  IEEE formats 

Assignment

References

OutLine

Session Objectives ◦ (^) To teach the difference between fixed point and floating point ◦ (^) To provide knowledge on various floating point representations ◦ (^) To introduce the terms for the various parts floating point representation  Teaching Learning Material ◦ (^) LCD, White board Marker, Presentation slides Objectives & Teaching Learning Material

Session Plan Time (in min) Content Learning Aid and Methodology Faculty Approach Typical Student Activity Skill and Competency Developed 05 Re-Cap Quiz Presentation Questions Organizes Answers Identifies Knowledge Evaluation 05 Introduction Explains^ Presentations^ Listens^ Knowledge 10 Floating Point Representation Explains Presentatio n Observes (^) Analytical 05 Formats Explains Presentatio n Observes (^) Analytical 15 Examples Presentati on Facilitates Solves (^) Analytical 10 Conclusion and Summary Summary Facilitates Listens Participates Comprehensio n

Fractional Binary Numbers

  • (^) Representation
    • (^) Bits to right of “binary point” represent fractional powers of 2
    • (^) Represents rational number: bi bi –1 • • • b 2 b 1 b 0. b –1 b –2 b –3 • • • b – j 1 2 4 2 i – 2 i
  • • •
  • • • 1/ 1/ 1/ 2
  • j bk  2 k k  j i

Floating-Point

Representation

  • 6132. 789 is represented in floating-point with a fraction and an exponent as follows: Fraction Exponent +0.6132789 + Scientific notation : + 0.6132789  10
  • (^) +/- .significand x 2 exponent
  • (^) Point is actually fixed between sign bit and body of mantissa
  • (^) Exponent indicates place value (point position) Sign bit Biased Exponent Significand or Mantissa
  • (^) Convert the following number;37. 75 into floating point format to fit in 32 bit register. - (^) Convert the number from decimal into binary - (^100101). 11 - (^) Normalize all digits including the fraction to determine the exponent. - 1. 0010111 x 2 5 0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 signsign EXPEXP Significant

Signs for Floating Point Mantissa is stored in 2s compliment Exponent is in excess or biased notation e.g. Excess (bias) 128 means 8 bit exponent field Pure value range 0- Subtract 128 to get correct value Range -128 to +

Normalization

  • (^) FP numbers are usually normalized
  • (^) i.e. exponent is adjusted so that leading bit (MSB) of mantissa is 1
  • (^) Since it is always 1 there is no need to store it
  • (^) (Scientific notation where numbers are normalized to give a single digit before the decimal point e.g. 3.123 x 10 3 )

Expressible Numbers

Density of Floating Point Numbers

 (^) Introduction  (^) Floating point Representation  (^) Examples  (^) Normalization  (^) IEEE formats Summary

Represent the following numbers into

various IEEE754 formats

◦ (^) 12312. ◦ (^) 3483. ◦ (^) 23232.

Assignment