简体   繁体   中英

Mantissa and Exponent - Negative number with decimal (beyond .5)

Here is my question. I am doing some work and am seeing two different answers. I was using a calculator (online) to check my answer and it is clashing with the answer I am supposed to get and I need to see which one is correct. The problem is:
-6.25
I worked this out for 6.25 and then took the twos complement.
6.25 --> 0110.001
Mantissa --> 0.11000100000 Exponent--> 0011

My Answer: Two's Complement 1.00111100000 Exponent--> 0011

The answer I should be getting says: Mantissa --> 1.11000100000 Exponent --> 0011
It doesn't seem to make sense that all you do is add a 1 in front of the positive Mantissa. I know that if the sign bit is a 0 it is a positive number and a 1 is a negative number. Could you please let me know which one is correct or if either of these are correct please? Thanks. Just want to make sure I am doing it right before I continue.

I'm not sure whether the number you want to convert is correct.

In my opinion:

6.25--->110.010(fixed point) or

6.125-->110.001(fixed point)

then you can transform the fixed form to exponent form,the complement of -6.125 is 1_001.111, with the exponent form 1.001111×2^3

So,I think your answer is correct,the other reference answer is just the true form of a negative binary number.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM