Boolean Logic Introduction Introduction

Procrastination's all fun and games until it's 2am the day before your twenty page term paper on photo-realistic turtle shell painting is due. You haven’t even started researching the topic, let alone finishing an outline. Last-minute manic desperation coursing through your veins, you turn on your computer and immediately go to your favorite, non-Bing search engine (whose name probably rhymes with Shmoogle).

First you try the entire phrase (photo-realistic turtle shell painting) but the same image keeps popping up—and it isn't even really what you were hoping for. Not one actual description of this groundbreaking art form in sight.

Next you try the words individually: "photo-realistic," "turtle," "shell," and "painting." This time all you can find are photo-realistic paintings. They're all great, but you're looking to blow the cover on the underground turtle-shell painting crowd; that impressive portrait of Morgan Freeman is going to have to wait. To add insult to injury, your search engine even tells you point blank that none of the results have the keyword, "turtle."

Un-, meet helpful.

Next you try putting the phrase in quotes, "photo-realistic turtle shell painting," but now all you're getting is information about the Shmoopville Photo-realistic Turtle Shell Club (sign us up for that mailing list), which is only helpful if you want to know who got the "Slow and Steady Improvement" award last year.

By now you’re close to giving up on your dream of writing the shocking exposé on shell painting. In a final spurt of desperation, you remember something a friend of yours told you: "Live long and prosper."

No, not that (although it is good life advice in general). They said something about an option called "Advanced Search." You click the button to find a page stuffed with options like, "Contains these exact words," "Makes no mention of," or "Also includes". There are even options for languages like Afrikaans and Esperanto.

(Not for Klingon, though. Yeah, we were disappointed too.)

Crossing your fingers, wondering where in the world Esperanto is spoken, and hoping for the best, you begin filling out the form. You want the results to have "photo-realistic turtle shell painting" without also including "Shmoopville Photo-realistic Turtle Shell Painting Club." You don’t need to see pictures, but you do want to know how they manage to paint on a turtle's shell while also making the images look so real. You use the word "techniques" to cover that realm.

(Don't worry: in all the interviews we've conducted on this fake art form, all the shells came from turtles who died of natural causes and wanted their bodies to be donated to art.).

Now when you click the Search button, the search looks almost like a math formula: techniques + "photo-realistic turtled shell painting" - "Shmoopville Photo-realistic Turtle Shell Painting Club." And it gives you all the results you're looking for.

Whew.

Your favorite non-Bing search engine didn't magically invent the system for giving you exactly what you need. It's using a part of math called boolean logic. Betcha' didn't see that one coming.

In boolean logic you can only have two values: true or false. Computers looooove boolean logic because they deal in only 0s and 1s, so they're basically pre-programmed to understand this stuff. It has a lot of formal rules like in normal logic, but it only lets things be true or false; no gray areas here. Your search engine, for example, found everything with the word "techniques," found every time it also talked about "photo-realistic turtle shell painting," and then made sure to leave out all references to the Shmoopville Photo-realistic Turtle Shell Painting Club.

Now the results given are exactly what you wanted. Hooray! All that's left is

  • evaluating your sources.
  • coming up with a thesis.
  • drafting an outline.
  • revising your outline.
  • writing a draft.
  • revising that draft.
  • getting feedback from your peers.
  • writing a final draft.
  • submitting your paper.

You know what? Maybe it'd just be better to head to bed and leave all that for tomorrow.

 

Why Should I Care?

Try to imagine a world without computers, calculators, tablets, or even smart fridges. We know: a world where you can't even check the weather while grabbing a glass of water is hard to imagine, but it would be ours if we didn't have boolean logic.

Scary.

Nothing digital could exist as we currently know and understand it. Quantum computing would probably still be a thing, but quantum logic itself builds on a foundation in boolean logic.

Boolean logic is a fundamental of computer science. If you don't know that fact, you won't know much about computers. It defines the way—the only way—computers approach and solve problems (as well as just giving them the ability to solve problems in the first place).

Boolean logic, with its trusty friends binary numbers and logic gates, represents and transmits information in binary, so it can communicate in bits and bytes: the basis of computer memory. Even the very first prototype of a computer, called the Analytical Engine, took advantage of boolean logic to solve some simple math.

When you get down to it, just about any math can be reduced to boolean logic. Knowing that connection is going to make you understand arguments from a whole different level. Learning boolean logic won't just make you a better computer scientist: it'll make you a better thinker.

Not bad, boolean logic. Not bad.