I would like to know what & does in the use case:
7 & 3
=> 3
8 & 3
=> 0
Or as seen in the general use case:
Integer & Integer
=> ??
I know that array & array2 gives the intersection between the two arrays, but I am unsure of exactly what is going on here when used with integers.
&is bitwise AND which examines the two operands bit-by-bit and sets each result bit to1if both the corresponding input bits are1, and0otherwise. You can also think of it as bit-by-bit multiplication.