Performing bitwise operations in C