Hello, I've been looking at binary operators lately.. And I don't quite understand some of them..

I know how to use bit shifting but I don't understand the rest.. like the logical operator (&) and the xor ^

Could anyone explain?

I know how to use bit shifting but I don't understand the rest.. like the logical operator (&) and the xor ^

Could anyone explain?

Bitwise AND (&) will only execute if both the first AND second are true.

Bitwise XOR is e__X__clusive __OR__. It will only execute if both arguments in question are opposite (i.e. one is true, and the other is false).

Example: 0 & 0 = 0 0 & 1 = 0 1 & 0 = 0 1 & 1 = 1 |

Bitwise XOR is e

Example: 0 ^ 0 = 0 0 ^ 1 = 1 1 ^ 0 = 1 1 ^ 1 = 0 |

Last edited on

Topic archived. No new replies allowed.