SQL
Bitstring Operators
The table below shows the available mathematical operators for `BIT` type.  
<div class="narrow_table"></div>  
<!-- markdownlint-disable MD056 -->  
| Operator | Description | Example | Result |
|:---|:---|:---|:---|
| `&` | Bitwise AND | `'10101'::BITSTRING & '10001'::BITSTRING` | `10001` |
| `|` | Bitwise OR | `'1011'::BITSTRING | '0001'::BITSTRING` | `1011` |
| `xor` | Bitwise XOR | `xor('101'::BITSTRING, '001'::BITSTRING)` | `100` |
| `~` | Bitwise NOT | `~('101'::BITSTRING)` | `010` |
| `<<` | Bitwise shift left | `'1001011'::BITSTRING << 3` | `1011000` |
| `>>` | Bitwise shift right | `'1001011'::BITSTRING >> 3` | `0001001` |  
<!-- markdownlint-enable MD056 -->