How to get the answer in binary?
2 views (last 30 days)
Show older comments
Here is the question:
Write a function m-file called to_binary.m that simply converts a single number into a string representing the binary form of that number. You can reuse to_binary.m to calculate the mantissa and exponent + bias terms.
>> to_binary (10.25)
a n s = 1010.01
>> to_binary ( -65)
a n s = -1000001
I know how to convert the number into binary but I don't know how to display them like this : "a n s = -1000001". Please help!
0 Comments
Answers (1)
See Also
Categories
Find more on Convert Image Type 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!