opnd is an unsigned int. "opnd" doesn't mean anything by itself. It's just the name of the variable. It could have been named "apple" or "susie" or almost anything else.
For the second part of your question, you should look into bitwise operators in C++.
This page looks like it explains it. https://www.cprogramming.com/tutorial/bitwise_operators.html
Check out the sections (or just read it all): - Bitwise AND
- The Bitwise Complement
Anything AND'd with 0 is 0.
Anything AND'd with itself is itself.
~ flips each bit. 0 goes to 1, and 1 goes to 0.