Python Programming - Operators - Discussion
Discussion Forum : Operators - General Questions (Q.No. 9)
9.
Which bitwise operator is used for the "exclusive or" (XOR)?
Answer: Option
Explanation:
The ^
operator compares each bit and set it to 1 if only one is 1, otherwise (if both are 1 or both are 0) it is set to 0:
For example:
7 = 0000000000000111
3 = 0000000000000011
--------------------
4 = 0000000000000100
====================
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers