Four bitwise operations you will use constantly: AND (), OR (), XOR (), and NOT (). Each operates on individual bits.
AND returns 1 only when both bits are 1. OR returns 1 when at least one bit is 1. XOR returns 1 when bits differ. NOT flips all bits. Example: , , , (in 4-bit).
Shift operations: left shift () multiplies by 2, right shift () divides by 2 (for unsigned). (binary becomes ). . These are faster than multiplication and division on most CPUs.