java - Why in the XOR exclusive operator does 1 and 1 =0? -


in bitwise "^" exclusive operator 1 , 1=0 shown below why that?enter image description here

simple answer, because defined way. if need functionality of or or and can have that, xor this.

it's sort of quintessential computer science operator, better used it. =)

philosophically, it's exclusive or. expect or when 1 of inputs 1, requires not both of them 1 @ same time, hence name exclusive.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -