0
$\begingroup$

I'm having difficulty with the following question:

Given a bit pattern with mantissa $10110000$ and exponent $0111$, what does the bit pattern represent in denary (i.e decimal / base 10)?

I got the right answer(!) but the wrong (or alternative) work:

  1. Convert the exponent to denary: $0111$ is $7$
  2. Apply this exponent to the mantissa: $10110000\rightarrow1011000$ after shifting $7$ places
  3. Convert the mantissa to denary: $1011000$ is $88$
  4. Set the sign: $-88$ (which is correct!)

Using a different method, the mantissa $1.0110000$ is somehow deteremined to be $-11/16$ and then $-11/16 \times 2^7 = - 88$ (I understand this shift with the exponent). However, what I don't understand is:

How do you convert 1.0101 (mantissa) to -11/16? Is this a standard way to do it?

$\endgroup$
4
  • $\begingroup$ So, $.10110000$ is $-11/16$; supposedly the additional $1$ at the beginning of any mantissa is redundant (because you'll know it will be there), but since you have to add that $1$ back in, I don't know how you would get $-88$ from that. $\endgroup$
    – Merbs
    Nov 16, 2012 at 13:31
  • $\begingroup$ I got the answer with a bit of reverse engineering. 1) 0111 is 7 in denary so the exponent is power(2,7) 2) convert 10101000 to a positive number using twos comp 3) you you get: 010110000 which is 1/2 + 1/ 8 + 1/16 using the powers of 2 after the radix point 4) this is 11/16 but we no it is negative from step 2 so it is -11/16! $\endgroup$
    – pythonMan
    Nov 16, 2012 at 17:59
  • 1
    $\begingroup$ This will depend on the exact representation used. The normal IEEE representations for example do not use two's complement $\endgroup$
    – jk.
    Nov 19, 2012 at 12:15
  • $\begingroup$ You may have a point, but the exam board does not use IEEE standard. It is something I will need to look into though. $\endgroup$
    – pythonMan
    Nov 20, 2012 at 16:16

1 Answer 1

1
$\begingroup$

I got the answer with a bit of reverse engineering.

1) 0111 is 7 in denary so the exponent is power(2,7)

2) convert 10101000 to a positive number using twos comp

3) you you get: 010110000 which is 1/2 + 1/ 8 + 1/16 using the powers of 2 after the radix point

4) this is 11/16 but we no it is negative from step 2 so it is -11/16!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.