This guide establishes a deeper proof-based look into the inclusive OR (i.e., Logical Disjunction) and the exclusive OR (i.e., Mutually Exclusive or Mutually Imparted Events).
Note
Before getting started, here is a very quick whiteboard into the intuitionism behind the inclusive operations and the exclusive operations, and logical equivalences for each of them; notice the use of the intermediary formulas (e.g., Disjunctive and Conjunctive Normal Forms):
Inclusive OR | Exclusive OR |
---|---|
![]() |
![]() |
The main take off messages here are:
- Logical Inclusive Disjunctions represent all the probablities in which the event
$$p$$ only happens or the event$$q$$ only happens or both of them happens (i.e., hence the name "inclusive"). - Logical Exclusive Disjunctions represent all the probablities in which only the event
$$p$$ or the only the event$$q$$ could happen. However, both cannot happen at the same time (i.e., hence the name "exclusive"). - Concurrency Programming: Logical Inclusive Disjunctions could be used in this context to model Asynchronous or Parallel executing tasks from two different threads (i.e., Mutually Inclusive Events); in this case both of them could return at the same time (i.e., inclusiveness applied) or at any later time.
- Concurrency Programming: Logical Exclusive Disjunctions could be used in this context to model Synchronous or Serially executing tasks from two different threads (i.e., Mutually Exclusive Events); in this case ONLY one task is allowed to execute (i.e., exclusiveness applied).
- Bitwise Manipulation and Switching Algebra: Logical Inclusive Disjunctions could be used to add up all pins state on a digital module (e.g., GPIO Module).
- Bitwise Manipulation and Switching Algebra: Logical Exclusive Disjunctions could be used to test whether 2 states are different (in this case, the operation returns true).