What is the difference between Inclusive and Exclusive OR? What is the difference between Inclusive and Exclusive OR? xml xml

What is the difference between Inclusive and Exclusive OR?


  • Inclusive or: A or B or both.
  • Exclusive or: Either A or B but not both.


A B OR XOR  1 0  1  1  1 1  1  0  0 1  1  1  0 0  0  0  


Considering the value for the statement "A OR B":

Inclusive OR allows both possibilities as well as either of them. So, if either A or B is True, or if both are True, then the statement value is True.

Whereas Exclusive OR only allows one possibility. So if either A or B is true, then and only then is the value True. If both A and B are True, even then the statement's value will be False.

Example for Exclusive OR: At a restaurant, you are offered a coupon which entitles you to eat either a Sandwich OR a Burger. This is an exclusive OR statement in English language. You can choose either one of them, but not both.