I wrote the following code to understand the bit-wise right shift operation,
unsigned long a = 0; unsigned long b = 0xFFFFFFFF; a = ~a; // now a