I ran across an online explanation of what masking is with respect to bitwise operators, but was unable to fully understand the explanation due to the use of symbols that I'm not familiar with. Here is the demonstration:
The specific line that confuses me is "// Actual shift is 10 & (8-1) = 2 ". I get that 10 is the number of bits that we want to shift left by, but what does "&" mean in this context, and why do we subtract 8-1?
Link to the demonstration can be found here:
https://msdn.microsoft.com/en-us/library/8xftzc7e(v=vs.100).aspx
Thanks in advance.