Skip to main content
added 89 characters in body
Source Link
Anders R. Bystrup
  • 16.1k
  • 11
  • 65
  • 59

The ^ operator is exclusive orexclusive or. The truth table for this is

 XOR | false true ------------------- false | false true true | true false 

That's why you get "1" - your if statement evaluates to true.

Cheers,

The ^ operator is exclusive or. The truth table for this is

 XOR | false true ------------------- false | false true true | true false 

That's why you get "1" - your if statement evaluates to true.

Cheers,

The ^ operator is exclusive or. The truth table for this is

 XOR | false true ------------------- false | false true true | true false 

That's why you get "1" - your if statement evaluates to true.

Cheers,

Source Link
Anders R. Bystrup
  • 16.1k
  • 11
  • 65
  • 59

The ^ operator is exclusive or. The truth table for this is

 XOR | false true ------------------- false | false true true | true false 

That's why you get "1" - your if statement evaluates to true.

Cheers,