Floating point representation Denary base 10 version - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Floating point representation Denary base 10 version

Description:

Floating point representation Denary (base 10 version) ... ADDING FLOATING POINT NUMBERS IN DENARY. To add the floating point numbers 05199520 04967850 ... – PowerPoint PPT presentation

Number of Views:104
Avg rating:3.0/5.0
Slides: 7
Provided by: evantr
Category:

less

Transcript and Presenter's Notes

Title: Floating point representation Denary base 10 version


1
Floating point representation Denary (base 10
version)
  • A way of representing decimal numbers of any size
    could be SEEMMMMM where S is the sign which is
    0 for positive and 5 for negative. E is the
    exponent value added to 50 and M is the mantissa.
  •  
  • Consider the number 29156 this could be
    represented as 0.29156 ? 105 In this example
    the mantissa is 29156 and the exponent is 50 5
    55, also the number is positive so the
    representation would be 05529156.
  •  
  • Similarly the number -0.000000052 -0.52 ? 10-7
    which would be represented as 54352000

2
Floating point representation Denary Exercise
(base 10 version)
Convert to SEEMMMMM form
  • 45
  • 0.00567
  • - 679000
  • -0.078

Convert to an ordinary Number from SEEMMMMM form
  • 05645000
  • 54956700
  • 55023679
  • 04790000

3
Floating point representation Denary Exercise
(base 10 version)
  • Answers
  • 05245000
  • 04856700
  • 55667900
  • 54978000
  • 560000
  • - 0.0567
  • - 0.23679
  • 0.0009

4
ADDING FLOATING POINT NUMBERS IN DENARY
  • To add the floating point numbers 05199520 ?
    04967850
  • First it is necessary to make the exponents the
    same by moving the decimal point in the mantissa
    of the second number right 2 places. (This is
    like aligning units, tens and hundreds etc.). We
    now get 05199520
  • 0510067850
  • Adding mantissa only we get (1)0019850
  • The (1) in brackets is a carry bit. To
    accommodate this bit, it is necessary to move the
    mantissa to the right and increase the exponent
    by one to get the answer.
  • i.e. 05210019(850) as we need only a 5 digit
    mantissa, by rounding we get 05210020
  • Check the answer

5
MULTIPLYING IN DENARY FLOATING POINT
  • To multiply the floating point numbers
  • 05220000 ? 04712500
  • First add the exponents and subtract 50
  • 52 47 50 49
  • Now multiply the mantissa
  • 0.20000 ? 0.12500 0.025
  • Normalizing we get a mantissa of 0.25 and
    therefore need to decrease the exponent by 1
  • (remember we increased the mantissa by
    multiplying by 10 so we compensate by reducing
    the exponent by 10)
  • The answer is 04825000
  • Check the answer

6
Floating point representation Binary (base 2
version IEEE standard 754)
  • A practical method in a computer (using binary)
    could be using 32 bits as follows
  • bit 31 is a sign bit using 0 for positive and 1
    for negative
  • bits 23 to 30 (i.e. 8 bits) for the exponent in
    excess of 12710
  • bits 0 to 22 representing the mantissa less one
    (it assumes all mantissas start with 1, so MSB is
    ignored)
  •  
  • Thus 10101.0110 1.0101011 ? 24 The sign bit is
    0 (it is a positive number), the exponent is
    13110 (this comes from 127 4 131 and 13110
    which is 10000011 in binary). This leaves the
    mantissa as 0101011 remember we ignore the 1 as
    all binary numbers can have a 1 to the left of
    the decimal point when normalised. The Precision
    floating point number is 0?10000011?0101011000000
    0000000000 the symbol ? separates the sign,
    exponent and mantissa for your ease.
Write a Comment
User Comments (0)
About PowerShow.com