c shift bits code example
Example 1: bitshift c
i = 14; // Bit pattern 00001110
j = i >> 1; // here we have the bit pattern shifted by 1 thus we get 00000111 = 7 which is 14/2
Example 2: c right bit shift
// 5: 0...0101
int a = 5;
//shift int a 2 bits
int n = (a >> 2);