MATLAB: How i can convert binary 128 bit to decimal?

128 bit binary converter

i work in data encryption, but i don't know how to convert a 128 binary to decimal. i try bin2dec and its not work and the error massage tell me : "Binary string must be 52 bits or less". please help
a=dec2bin(7,128)
b=bin2dec(a)
Error using bin2dec (line 36)
Binary string must be 52 bits or less.

Best Answer

Double precision numbers only have a 52-bit mantissa (+1 hidden leading bit), hence the error. A uint64 has 64 bits, and that is the max you can have for numeric types. To deal with this many bits in a number you will need to use something else. E.g either the Symbolic Toolbox, or use the Variable Precision Integer FEX submission by John D'Errico: