blob: c44d42c4e0b98ed4287940273250ab9492c622ff [file] [log] [blame]
<table class="table">
<thead>
<tr>
<th style="width:25%">Function</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>expr1 & expr2</td>
<td>Returns the result of bitwise AND of `expr1` and `expr2`.</td>
</tr>
<tr>
<td>base << exp</td>
<td>Bitwise left shift.</td>
</tr>
<tr>
<td>base >> expr</td>
<td>Bitwise (signed) right shift.</td>
</tr>
<tr>
<td>base >>> expr</td>
<td>Bitwise unsigned right shift.</td>
</tr>
<tr>
<td>expr1 ^ expr2</td>
<td>Returns the result of bitwise exclusive OR of `expr1` and `expr2`.</td>
</tr>
<tr>
<td>bit_count(expr)</td>
<td>Returns the number of bits that are set in the argument expr as an unsigned 64-bit integer, or NULL if the argument is NULL.</td>
</tr>
<tr>
<td>bit_get(expr, pos)</td>
<td>Returns the value of the bit (0 or 1) at the specified position.
The positions are numbered from right to left, starting at zero.
The position argument cannot be negative.</td>
</tr>
<tr>
<td>getbit(expr, pos)</td>
<td>Returns the value of the bit (0 or 1) at the specified position.
The positions are numbered from right to left, starting at zero.
The position argument cannot be negative.</td>
</tr>
<tr>
<td>base shiftleft exp</td>
<td>Bitwise left shift.</td>
</tr>
<tr>
<td>base shiftright expr</td>
<td>Bitwise (signed) right shift.</td>
</tr>
<tr>
<td>base shiftrightunsigned expr</td>
<td>Bitwise unsigned right shift.</td>
</tr>
<tr>
<td>expr1 | expr2</td>
<td>Returns the result of bitwise OR of `expr1` and `expr2`.</td>
</tr>
<tr>
<td>~ expr</td>
<td>Returns the result of bitwise NOT of `expr`.</td>
</tr>
</tbody>
</table>