# BIN

Returns a string representation of the binary value of N, where N is a longlong (BIGINT) number.

This is equivalent to CONV(N,10,2).

## Syntax

```sql
BIN ( expression )

```

> **📝 Note**: The function BINARY is not an alias for BIN.

## Arguments

* expression: any valid numeric expression.

## Return Type

A string containing numeric value, in binary. Float values are truncated. Returns NULL if expression is NULL.

## Examples

```sql
SELECT BIN(1234);

```

```output

+-------------+
| BIN(1234)   |
+-------------+
| 10011010010 |
+-------------+

```

```sql
SELECT BIN(1234.5678);

```

```output

+----------------+
| BIN(1234.5678) |
+----------------+
| 10011010010    |
+----------------+
```

***

Modified at: April 3, 2023

Source: [/db/v9.1/reference/sql-reference/string-functions/bin/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/string-functions/bin/)

(An index of the documentation is available at /llms.txt)
