String-valued functions return NULL, if the the result's length would be greater than the value of the max_allowed_packet system variable.
The first position of a string (for those functions which operate on string), is numbered 1.
Noninteger arguments are rounded to the nearest integer (For functions that take length arguments).
BIN(N)
BIN function returns the binary value of 'N', where n is any value.
For example -
mysql> SELECT BIN(13);
+---------+
| BIN(13) |
+---------+
| 1101 |
+---------+
1 row in set (0.00 sec)
mysql> SELECT BIN(5898);
+---------------+
| BIN(5898) |
+---------------+
| 1011100001010 |
+---------------+
0 Comment(s)