Bitwise Operation
Example Binary numbers
Bitwise AND
Take two numbers, line them up on top of each other, and create a new number that has a 1 where both numbers have a 1 (everything else is 0).
Bitwise OR
Take two numbers, line them up on top of each other, and create a new number that has a 1 where either number has a 1 (everything else is 0).
Bitwise NOR (Not OR)
Take the Bitwise OR of two numbers, and then reverse everything (where there was a 0, there's now a 1, where there was a 1, there's now a 0)
Bitwise XOR (exclusive OR)
Take two numbers, line them up on top of each other, and create a new number that has a 1 where either number has a 1 AND the other number has a 0 (everything else is 0).
Bitwise NAND (Not AND)
Take the Bitwise AND of two numbers, and then reverse everything (where there was a 0, there's now a 1, where there was a 1, there's now a 0).
Bitshift Operator
means "shift everything left n bits" or "shift everything right n bits"