mysql - want to convert hex to binary which gives answer is more than 64 bits -


i want convert hex binary

if use conv function gives wrong result if result contains binary value greater 64 bits

i want convert below hex no binary

hex b3c935bb3667c964db1381db72fd8c897023879b19ab42e937839983cece465d18b719b8a37059ead4152298396f78743aa48245d1d80b899d19bd4e8217c963a187e97d028726c2

if use conv function gives result like:

 select conv('b3c935bb3667c964db1381db72fd8c897023879b19ab42e937839983cece465d18b719b8a37059ead4152298396f78743aa48245d1d80b899d19bd4e8217c963a187e97d028726c2 ',16,2); 

output:

1111111111111111111111111111111111111111111111111111111111111111

but want answer :

101100111100100100110101101110110011011001100111110010010110010011011011000100111000000111011011011100101111110110001100100010010111000000100011100001111001101100011001101010110100001011101001001101111000001110011001100000111100111011001110010001100101110100011000101101110001100110111000101000110111000001011001111010101101010000010101001000101001100000111001011011110111100001110100001110101010010010000010010001011101000111011000000010111000100110011101000110011011110101001110100000100001011111001001011000111010000110000111111010010111110100000010100001110010011011000010

b3c935bb3667c964db1381db72fd8c897023879b19ab42e937839983cece465d18b719b8a37059ead4152298396f78743aa48245d1d80b899d19bd4e8217c963a187e97d028726c2 can't treated hexademical value, it's far more bigger maximum 64-bit integer value equivalent (7fffffffffffffff)16.

mysql gives correct result of (7fffffffffffffff)16 = (0111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111)2. use string binary conversion instead if achive result mentioned.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -