SQL
Creating a Bitstring
A string encoding a bitstring can be cast to a `BITSTRING`:  
```sql
SELECT '101010'::BITSTRING AS b;
```  
<div class="narrow_table monospace_table"></div>  
|   b    |
|--------|
| 101010 |  
Create a `BITSTRING` with predefined length is possible with the `bitstring` function. The resulting bitstring will be left-padded with zeroes.  
```sql
SELECT bitstring('0101011', 12) AS b;
```  
|      b       |
|--------------|
| 000000101011 |  
Numeric values (integer and float values) can also be converted to a `BITSTRING` via casting. For example:  
```sql
SELECT 123::BITSTRING AS b;
```  
<div class="narrow_table monospace_table"></div>  
|                b                 |
|----------------------------------|
| 00000000000000000000000001111011 |