To know more about Bitwise operation please read the Bitwise Operator in C. It explains how these bitwise operator work in C
#include <stdio.h>
void main(void)
{
int i=165,j=281;
printf("Bitwise AND operation of %d and %d is %d \n", i,j, i&j);
printf("Bitwise OR operation of %d and %d is %d \n", i,j, i|j);
printf("Bitwise XOR operation of %d and %d is %d \n", i,j, i^j);
printf("2 bits right shift of %d is %d \n", i, i>>2 );
printf("3 bits left shift of %d is %d \n", i, i<<3);
printf("NOT operation of %d is %d \n", i, ~i);
}