Hi........
I want to convert decimal numbers to binary form in MATLAB.. I used dec2bin(d,k) function to convert it. But it only supprts for numbers less than 2^53. I want conversion for numbers upto 2^64.
I needed this as a part of my project.....So please help me.....or give me any hints.......... please.
Thanks in advance
Angu
hi flanello
thank u for ur efforts..
I tried to implement our hand-division method for dec-binary conversion..
but for numbers greater than 2^53 - 1, arithmetic operations wont support........so we cannot do division or modulo division...
If u have any other way to solve this pblm, pls help me
thank u
Unfortunately I haven’t matlab available at the moment…..
What operations can you do in matlab with number greater than 2^53 - 1?
Because if you can subtract, you can build your own divison/modulo function with a simple loop.
I now this is not a performant solution....
But I have no better idea at the moment
Added after 11 minutes:
If the handcoded functions works, you can use these functions for the first bits until the remaining number is smaller than 2^53. Then you can use the dec2bin function from matlab.
I made a exel spreadsheet a while back to convert binary to decimal and vica versa. At the moment it only extends to 1024. If you still neeed something like this let me know, and I'll extend to whatever it was you required.
It sounds like if Matlab doesn't support decimal numbers greater than 2^53, you may need to create a custom data type & the appropriate conversion function.