From the MySQL user guide for the function MD5():
The value is returned as a string of 32 hexadecimal digits or NULL, if there was an argument NULL.
The MSSQL function CONVERT()that you quote above converts its argument varbinaryto a 32-bit integer, truncating to the least significant 4 bytes. This is a bit unpleasant because MySQL arithmetic works with 64-bit precision.
8- MySQL- ( 4 ) MySQL CONV(), sign-extend :
CONV(RIGHT(MD5('foo'),8), 16, 10) ^ 0x80000000 - 0x80000000