Today we’ll look at the third out of four bitwise operators – bitwise XOR. Bitwise XOR is represented by the symbol ^ and is an exclusive OR operation. Can I see an example? 130 ^ 10 = 136 What is this actually doing? Bitwise XOR compares each bit setting and if either one is set, […]

Following on from last week’s look at the bitwise AND operator, this week I’m going to look at bitwise OR and provide an example of how you can use it. Bitwise OR is represented by the | symbol. Can I see an example? 130 | 10 = 138 What is this actually doing? Bitwise OR […]

I’m going to spend the next few weeks taking a look at the bitwise operators (AND, NOT, OR, XOR), and how they are used in C/C++. How often you are faced with problems that use these operators depends on the field you are working in, and the coding preferences of the people that have gone […]