Bitwise Operations: AND, OR, XOR, Shifts and Bit Masks for Flags
Bitwise operators process the bits at the same position in two numbers independently; AND filters, OR adds, XOR flips, shifts move. Setting, clearing, toggling and testing Bookstore permissions in one integer, BitOperations, the C# 11 >>> operator, masked shift counts, and how TypeScript squeezes every bitwise operation into 32 bits and silently breaks large IDs.
14 Nov 2026
·
12 min
·
7