imasciencegeek:

A fresh recap on logical use of inclusive and exclusive or. Been thinking about this recently in association with other systems.

Originally posted on Division by Zero:

(That was a fun title to write!)

At the start of our discrete mathematics course we talk about symbolic logic. Students are often confused by the logical operator “OR.”

If p and q are statements then p OR q is true if either p is true or q is true or if both p and q are true. This is easily expressed in a truth table:

p q p OR q
T T T
T F T
F T T
F F F

The reason this confuses students is that sometimes when we say “or” in everyday conversation we mean p is true or q is true, but p and q are not both true. (For example, “the door is open or the door is closed.”)

This brings to mind the logical operation exclusive or, “XOR” (the usual “or” is inclusive or). The truth table for XOR is…

View original 424 more words

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s