My fascination with computers started as a teenager.  My Algebra teacher, Ms. Barba, also taught computer programming.  Initially, she guilted me for being so lackadaisical as a freshman, but eventually also encouraged me as I improved and eventually excelled.  As a senior, I intentionally took the Computer Math class because I knew she’d be teaching it.  Subsequently, she got me into two summer programs, one in my high school, the other at the University of Miami.  I do not hesitate to say that I would not be here had it not been for her, and I’m eternally grateful.

She automatically enrolled us into the ACSL (American Computer Science League) competitions.  I remembered the letters; it wasn’t until today when I realized that they stood for.  I’m delighted to learn that it continues today.  In some ways, those competitions piqued my curiosity around computer programming and drove my passion for the field.

The competition had both a programming portion and a written portion.  The written portion included evaluating logic statements.  Initially, I didn’t realize how logic factored into programming, but I enjoyed the problem solving, nonetheless.  In fact, we use logic operators every day.


The building blocks of logic

There are three logical operators that make up the building blocks of logic statements.  Two of them are binary operators and one is a unary operator.  As mentioned above, we use them every day, but the non-computer geeks among us simply don’t think about them as logical operators.  However, we still understand how they work:

  • NOT operator (unary):  This simply negates the statement.  Take the statement, “Today is Monday.”
    • It’s true if today is Monday and false if it’s any other day of the week.
    • Hence “Today is not Monday.” simply reverses the statement.
  • AND operator (binary): This is true when both conditions are true, and false otherwise.  “We’ll picnic when it’s a weekend day and it’s sunny.”
    • Sunny weekdays do not qualify.
    • Non-sunny weekend days do not qualify.
  • OR operator (binary): This is true when either condition is true, and false otherwise.  “Kids who are 13 years old or at least 5-feet tall may participate.”
    • Kids who are only twelve but are 5-feet tall may participate.
    • Kids who are only 4-feet 10-inches tall but are 13 years old may participate.

We compose logical expressions by combining the above operators with multiple statements.  This is your minimal set.


Introducing the fancier binary operators

Naturally, there are other binary operators.  Though these are typically reserved for the geeks among us.  Well cover the ‘and’ and ‘or’ mentioned above and add a handful of others, and I’ll introduce truth tables.

Value-Pair/Operator Tautology Fallacy AND OR NAND NOR XOR XNOR
false/false true false false false true true false true
false/true true false false true true false true false
true/false true false false true true false true false
true/true true false true true false false false true

For the sake of completeness, I listed a larger table, but a couple of things to note:

  • Tautologies are always true, independent of any condition.  That’s how they’re defined.
  • Fallacies are always false, independent of any condition.  That’s how they’re defined.
  • All these operators are communitive.  A and B evaluates to the same as B and A.  Therefore, the “false/true” and “true/false” rows may be collapsed into one, since they evaluate to the same value.

The one that I always found fascinating was the XOR (read as ‘Exclusive OR’) and its negation the XNOR (read as the ‘Exclusive NOR’).  The best way to describe them:

  • Exclusive OR is true when the values are different (either true/false or false/true).
  • Exclusive NOR is true when the values are the same (either true/true or false/false).

 And to me, the interesting question is whether there’s a good real-world use for the XOR (or XNOR).


The Founding Fathers and the Constitution

How we interpret the founding fathers and the Constitution fall into two schools of thought.  First, they had God-like foresight and wisdom, and their words are beyond contestation.  Second, they’re certainly forward thinking, but we may re-evaluate their assertions… that their opinions are not written in stone.

However, whether you happen to fall on the first bucket or the second, something is certainly true.  You can’t assert that they had God-like wisdom on one issue, and later claim that we can question other issues.  For instance, it’s either all or nothing; you can’t nitpick.  Let’s take two clauses in the bill of rights:

  • First Amendment: Freedom of religion.  Specifically, it prevents the government from making laws that regulate an establishment of religion, or that prohibit the free exercise of religion,
  • Second Amendment: The right to bear arms.

Here’s where the rubber meets the road, if you can’t pick and choose which assertions are beyond contestation and which ones you may question.  Then the only two options are:

  • Founding fathers were right:  We collectively have the right to bear arms under the second amendment and we are collectively free to practice any religion (and even the lack of religion).  Therefore, it means that we need a strict separation of church and state…  In other words, we can’t establish laws on the premise that our country was founded on Judeo-Christian values because it would explicitly prevent us from practicing other religions.
  • Founding fathers may be wrong: We may re-evaluate that our country should lean towards Judeo-Christian values (although that impinges on the rights of some citizens) and we may also establish reasonable restrictions by which our citizens may bear arms or ban access to firearms altogether.

We either blindly accept them both or may question them both; there is no third option.


Using the XNOR to express this

As it happens, this may be expressed through an XNOR statement, which is either statement may be true or false, but they both have to match in order for this to be true.  Take the two statements:

  • Statement A:  We may question the extent of freedom of religion as protected by the First Amendment, which asserts strict separation of church and state.
  • Statement B:  We may question the extent of the right to bear arms and pose restrictions (or even ban) to how citizens may own and wield firearms.

Furthermore, we express it as:

Statement A XNOR Statement B

This stipulates that you can either question them both or accept them both.  However, there is no condition by which you may question one and not the other.

This is certainly just a little exercise in illustrating the hypocrisy by which some pick and choose which elements of the Constitution they feel apply.  For instance, you may assert that you are legally protected to carry a weapon and say whatever you want (as hateful as it may be) as free expression.  However, in doing so, you must also concede practicing any religion (even Wicca, Satanism, or FSM) is similarly legally protected and any laws that impede it (like “Don’t Say Gay” laws, under the guise of moral values) are unconstitutional.  Similarly, if you allow a Christian club in school, you must also allow a Satanist club in school; the rules apply to both religions without bias.


 

Facebook Comments