0
$\begingroup$

I'm learning about floating point numbers and I don't quite understand when one should interpret an exponent as moving the decimal point to the left.

By book shows an example of converting -10.5 into binary in normalised form (using 8 bits):

  • First we convert it into binary without normalisation and use a fixed floating point representation, giving 10101.100
  • We know to normalise it, the decimal point must move four places to the left (so when we get the normalised number, the decimal point would having to move four places right)
  • So in normalised form, we get a mantissa of 1.0101100 and an exponent of 4

Now, my book represents four at 100, but it also says to use two's complement. Therefore, can't I interpret 100 as -4? When would I know to interpret an exponent as negative or positive? I.e., when would I know to move a decimal point to the left when given a mantissa?

$\endgroup$
  • $\begingroup$ Look for IEEE 754 floating point standard $\endgroup$ – HEKTO Jun 21 '17 at 18:03
  • 1
    $\begingroup$ 4 doesn't exist in 3-bit 2's complement. The range there is -4 to 3. $\endgroup$ – Ben I. Jun 21 '17 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.