Converting decimal value to binary
Show older comments
I have to convert decimal value to binary ,in hich my decimal value is in negative and positive
my values are
a=[ 0.0803
0.0726
0.0469
-0.0038
-0.0421]
please help how to convert to binary
Accepted Answer
More Answers (1)
Walter Roberson
on 21 Nov 2012
0 votes
There are three competing standards for the representation of negative integers.
There are many methods for the representation of fractions. The ones used to represent floating point double precision numbers use some schemes that required work to deal with unusual cases.
We cannot tell you how to do the conversion until you tell us which representation you wish to use.
4 Comments
Pat
on 21 Nov 2012
Walter Roberson
on 21 Nov 2012
Is the representation one's complement, two's complement, or separate-sign? How many bits of exponent? How many bits of mantissa? Is the exponent separate-sign or two's complement or biased? What is the power that the exponent is to be raised to? Is the first bit of the mantissa to be explicit, or is it to be "hidden"?
For example, show us the exact bit breakdown you wish to use for -1E+42
Pat
on 21 Nov 2012
Walter Roberson
on 21 Nov 2012
Use the following standard but delete the last two bits of the mantissa:
Categories
Find more on Lengths and Angles in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!