c bit operations code example
Example 1: bitwise operator
12 = 00001100 (In Binary)
25 = 00011001 (In Binary)
Bitwise XOR Operation of 12 and 25
00001100
^ 00011001
________
00010101 = 21 (In decimal)
Example 2: opération bit à bit c
unsigned a = 0xF0F0;
unsigned b = 0x00FF;
unsigned c = a & b; /* c == 0000000011110000 soit 0x00F0 */