# Number to binary

Canonical: https://www.wiki.jodisand.me/snippets/python/to_binary/


Returns the binary representation of the given number.

- Use `bin()` to convert a given decimal number into its binary equivalent.

```py
def to_binary(n):
  return bin(n)
```

```py
to_binary(100) # 0b1100100
```


