The bitand keyword is an alias, or alternative operator, for the & operator, which performs a BITWISE AND operation (which is just an AND operation that compares the individual bits of two operands).
Syntax
<expression> bitand <expression> ;
Example
bitand.cpp
C++
<cstdio>int main() { char item1 = 0b1001; char item2 = 0b0111; char item3 = item1 bitand item2; // same as item1 & item2 printf("%#06b\n", item3); return 0;}
Output when executed:
0b0001