Bitwise Operations

The Wolfram Language can represent bit vectors of arbitrary length as integers, and uses highly optimized algorithmsincluding several original to Wolfram Researchto perform bitwise operations with maximal efficiency on all standard computer systems.

Bitwise Logic Operations

BitAnd  ▪  BitOr  ▪  BitXor  ▪  BitNot

Structural Bitwise Operations

BitLength  ▪  BitShiftLeft  ▪  BitShiftRight

SingleBit Operations

BitSet  ▪  BitClear  ▪  BitGet

DigitCount total count of 0 or 1 bits

IntegerExponent number of trailing 0s

CellularAutomaton arbitrary local bitwise operations

IntegerDigits convert to a list of digits

FromDigits convert to an integer from a list of digits