top of page
05 Bit Operations
bitSet() and bitClear()
Sets (writes a 1 to) or Clears (writes a 0 to) a bit of a numeric variable.
bitSet(x, n)
bitClear(x, n)
x: the numeric variable whose bit to clear.
n: which bit to clear, starting at the least-significant (rightmost) bit.
Returns
x: the value of the next bit at position n is cleared.
bottom of page