Bit manipulation
1.Flip operation
char x = 'A' // 01000001
char y = ~x; // 101111102.And operation
char x = 'A'; // 01000001
char y = 'L'; // 01001100
char z = x & y;// 010000003.Or operation
4.XOR operation
5.Shift operation
6.Get the Nth bit
7.Set the Nth bit to 1
8.Print bits an integer
9.Count the number of 1 bits
10.Reverse the bits in an integer
Last updated