[ Log On ]
  • Home
  • Tst
  • Cha
  • Enc
  • Code
  • IP
  • Fun
  • Sub
  • DigF
  • Cis
  • Com
  • Db
  • About
  • Netsim

Floating Point Conversion

[Back] With floating point representation, we have a Sign, a Mantessa and an Exponent. A typical format is:

SEEE EEEE EMMM MMMM MMMM MMMM MMMM MMMM

where

  • S is one bit for the sign. If it is 1, the value is negative.
  • EEEEEEEE defines the exponent, which is used in the result by multiplying by 2 to the power of this value.
  • MMM ... MMM defines the mantessa, which is in the format of 0.MMMM, where the first M represents a value of 0.5, the second value of 0.25, and so on

As an example if we have S of 0, the exponent of 0000 0111, and Mantessa of 1100. We then get:

Value is (2^7) * (0.5 * 1) + (0.25* 1) +(0.125 * 1) which is equal to 128 * 0.875 which is thus: 112.

DescriptionResult
Exponent:
Mantessa:
Result: 0
SignExp 7Exp 6Exp 5Exp 4Exp 3Exp 2Exp 1Exp 0
Mant 7Mant 6Mant 5Mant 4Mant 3Mant 2Mant 1Mant 0