bit mask
A number whose 1 bits pick out the bits you care about, used with AND, OR or XOR to test, set, clear or flip them.
A mask m selects bit positions; x | m sets them, x & ~m clears them, x ^ m toggles them, and x & m tests them.
Examples
x & 0xFFkeeps the low byte ofx;x | (1 << 3)sets bit 3.
See also