Boolean Logic: Truth Tables

    Boolean Logic: Truth Tables

      Premises—the most basic logical statements—love being connected. Just like seasonings and sauces you can connect sandwich ingredients with, premises can be connected through a smorgasbord of logical connectives. Granted, some combinations are downright awful (Brussels sprouts, Tartar sauce, and celery, anyone?) while others are simply perf (grilled cheese with Sriracha? Mmmm, yes).

      As far as connectives go, the simplest ones (mayo, pickles, anchovies, etc.) are

      • and (∧), which says that both premises are true. You don't have to use that ∧, though: lots of people just use no symbol at all (XY).
      • not (~), which says that whatever was true is now…not true. You can also use an overline for not (). It's all the same.
      • if-then (⟶), which says that if one thing's true, then the other thing must be true.
      • or (∨), which says any of the premises can be true; in fact, they can all be true. Sometimes people use a + for or (X + Y).
      • xor (⨁) says that one premise or the other will be true, but both can't be true at the same time.

      We could fill out Venn Diagrams all day showing how these work, but you might not be a visual kind of person. You might just be looking for cold, hard facts.

      Enter: the Truth Table.

      If connectives allow us to make complex and delicious logical sandwiches, then truth tables let us scientifically analyze how every piece comes together to create a delicious masterpiece.

      Sorry, it's almost lunch. We're a little hungry.

      In a good truth table, you'll have premises and connectives. The premises will basically be pre-formulated; they can either be true or false. Say you have two friends: Vicki and Omar. In a premise, you'd say

      • Vicki's going to the premiere of Jurassic Park 15.
      • Omar's going to the premiere of Jurassic Park 15.

      The truth table's going to look like this:

      VO
      TrueTrue
      TrueFalse
      FalseTrue
      FalseFalse

      Individually, Vicki and Omar could go to the premiere or not. But we need to catch every combination of whether one, both, or neither is going to see some extinct animals at midnight. Add a third person, Lupita, and you'd need eight rows (23). That way, once you start making statements about one, two or all three friends, you'll be able to see every possible outcome.

      Got it? Let's start using connectives.

      Truth tables show how the truth values of the premises change the truth values of the whole, like how different sauce combinations with the same ingredients can change the deliciousness (or even edibility) of lunch.

      And

      Here's what the truth table for ∧ looks like. 

      VOV ∧ O
      TrueTrueTrue
      TrueFalseFalse
      FalseTrueFalse
      FalseFalseFalse

      There aren't many combinations that make the ∧ connective true. If we say that Vicki and Omar are going to see dinosaurs eating things in 3D, if either of them back out then our statement's no longer true.

      Not

      Let's just focus on Vicki for a moment. Maybe she had a change of heart and decided chase scenes involving 20-foot puppets wasn't her cup of tea. If we say that she isn't going to the movie, that's the same as using the ~ symbol (which means "not"), like this:

      V~V
      TrueFalse
      FalseTrue

      If Vicki has another change of heart and decides to see the movie after all, then our previous statement, (~V) is False. If we were right and V is False, then ~V is True.

      Implies

      Now for implies. Say Omar won't go to the movie unless Vicki goes. That's the same as an implication symbol. The truth table's going to look like this:

      OVO ⟶ V
      TrueTrueTrue
      TrueFalseFalse
      FalseTrueTrue
      FalseFalseTrue

      If Vicki goes, then Omar's going to go too. But Vicki said nothing about only going if Omar comes along. If Omar doesn't show but Vicki does, this statement's still going to be true. If neither of them goes, then it's true Omar didn't go without Vicki. So the only False value is if Omar goes but Vicki doesn't. That isn’t going to happen (unless Omar lied about how committed to seeing a film with Vicki he is).

      Or

      Let's say Vicki or Omar's going to the movie, we just aren't sure which one—or both—is going.

      VOV ∨ O
      TrueTrueTrue
      TrueFalseTrue
      FalseTrueTrue
      FalseFalseFalse

      As long as at least one of them goes, our statement's going to be True. It's as simple as that.

      Exclusive Or

      Maybe Vicki and Omar had a big fight the night before the release. The tickets they bought are right next to each other, but they can't be in the same room together right now. We'd have to amend our connective to say that either Vicki or Omar will go to the movie, but not both. That's going to look like this:

      VOV ⨁ O
      True TrueFalse
      TrueFalseTrue
      FalseTrueTrue
      FalseFalseFalse

      If Omar goes, Vicki doesn't. If Vicki goes, Omar's going to put on his pajamas and watch his favorite rom com. If neither go, they've just wasted over 20 dollars, which isn't going to happen.

      Truth tables are as easy as forcing your friends to stay up late to watch a mediocre sequel to a dying franchise.