Main Content

Bit-Wise Operations

Set, shift, or compare specific bit fields

Bit-wise operators are used to change the bit patterns of numbers. These operations are efficient since they are directly supported by most CPUs. For more information, see Bit-Wise Operations.

Functions

bitandBit-wise AND
bitorBit-wise OR
bitxorBit-wise XOR
bitcmpBit-wise complement
bitgetGet bit at specified position
bitsetSet bit at specific location
bitshiftShift bits specified number of places
swapbytesSwap byte ordering

Topics