# In MySQL, how we can get the corresponding string representation of the binary value of a number?

MySQLMySQLi Database

In MySQL, BIN() function is used to get the corresponding string representation of the binary value of a number. It considers the number as a DECIMAL number.

## Syntax

BIN(value)


Here value, a BIGINT number, is the number whose binary value is to be retrieved.

## Example

mysql> Select BIN(15);
+---------+
| BIN(15) |
+---------+
| 1111    |
+---------+
1 row in set (0.00 sec)

Published on 19-Feb-2018 13:29:56