Intro to Truth Tables & Boolean Algebra

Intro to Truth Tables & Boolean Algebra

Image for postFollow Math Hacks on Instagram

A truth table is a handy little logical device that shows up not only in mathematics but also in Computer Science and Philosophy, making it an awesome interdisciplinary tool. The notation may vary depending on what discipline you?re working in, but the basic concepts are the same.

This primer will equip you with the knowledge you need to understand symbolic logic. We?ll start with defining the common operators and in the next post, I?ll show you how to dissect a more complicated logic statement.

? For more math tutorials, check out Math Hacks on YouTube! ?

Math Hacks

Welcome to Season Two of Math Hacks! This season we’ll be covering topics from Algebra and Trigonometry as well as?

www.youtube.com

What is Boolean Algebra?

Boolean Algebra is a branch of algebra that involves bools, or true and false values. They?re typically denoted as T or 1 for true and F or 0 for false. Using this simple system we can boil down complex statements into digestible logical formulas.

Unary Operators

Unary operators are the simplest operations because they can be applied to a single True or False value.

Identity

The identity is our trivial case. It states that True is True and False is False.

Negation

The negation operator is commonly represented by a tilde (~) or symbol. It negates, or switches, something?s truth value.

We can show this relationship in a truth table. A truth table is a way of organizing information to list out all possible scenarios.

We title the first column p for proposition. In the second column we apply the operator to p, in this case it?s ~p (read: not p). So as you can see if our premise begins as True and we negate it, we obtain False, and vice versa.

Image for postTruth Table for Logical Negation in TF and 01 notations

Logical True and Logical False

These are kinda strange operations. Logical true always results in True and logical false always results in False no matter the premise. These operations are often referred to as ?always true? and ?always false?.

Image for postLogical True (aka ?always true?) in TF and 01 notationsImage for postLogical False (aka ?always false?) in TF and 01 notations

Binary Operators

Binary operators require two propositions. We?ll use p and q as our sample propositions.

AND

The AND operator (symbolically: ?) also known as logical conjunction requires both p and q to be True for the result to be True. All other cases result in False. This is logically the same as the intersection of two sets in a Venn Diagram.

Image for postImage for postTruth table for Logical Conjunction (aka ?AND?) can also be modeled as a Venn Diagram intersection

OR

The OR operator (symbolically: ?) requires only one premise to be True for the result to be True. This is equivalent to the union of two sets in a Venn Diagram.

Image for postImage for postTruth Table for ?OR? can be thought of as a Venn Diagram Union

NOR

Logical NOR (symbolically: ?) is the exact opposite of OR. It requires both p and q to be False to result in True.

Image for postImage for postTruth Table for ?NOR? can be thought of as the opposite of a Venn Diagram Union

XOR

Exclusive Or, or XOR for short, (symbolically: ?) requires exactly one True and one False value in order to result in True.

Image for postImage for post

Conditional Operators

Implication

Logical implication (symbolically: p ? q), also known as ?if-then?, results True in all cases except the case T ? F. Since this can be a little tricky to remember, it can be helpful to note that this is logically equivalent to p ? q (read: not p or q)*.

Let?s create a second truth table to demonstrate they?re equivalent. To do this, write the p and q columns as usual. Then add a ?p? column with the opposite truth values of p. Lastly, compute p ? q by OR-ing the second and third columns. Remember to result in True for the OR operator, all you need is one True value.

Image for postImage for postTruth tables showing the logical implication is equivalent to p ? q.

*It?s important to note that p ? q ? (p ? q). In the first case p is being negated, whereas in the second the resulting truth value of (p ? q) is negated.

Logical Equality

Also known as the biconditional or if and only if (symbolically: ??), logical equality is the conjunction (p ? q) ? (q ? p). In other words, it?s an if-then statement where the converse is also true.

The only way we can assert a conditional holds in both directions is if both p and q have the same truth value, meaning they?re both True or both False. This is why the biconditional is also known as logical equality.

Image for postBiconditional Truth Table

Surprisingly, this handful of definitions will cover the majority of logic problems you?ll come across.

In the next post I?ll show you how to use these definitions to generate a truth table for a logical statement such as (A ? ~B) ? (C ? D).

Need More Math Help?

  • Check out Math Hacks on YouTube for more hands-on math tutorials covering popular topics from Algebra through Advanced Math.
  • You can find a number of interesting math topics and problems right here on Medium, just click that follow button!

Thanks for joining me!

? STAY CONNECTED ?

Stay up-to-date with everything Math Hacks is up to!

Instagram | Facebook | Twitter

Math Hacks

Welcome to Season Two of Math Hacks! This season we’ll be covering topics from Algebra and Trigonometry as well as?

www.youtube.com

Next Lesson:

Symbolic Logic With Truth Tables

We covered the basics of symbolic logic in the last post. Now let?s put those skills to use by solving a symbolic logic?

medium.com

More Math Stuff ?

Vampires, Insanity & Transylvanian Sisters

A Logic Puzzle

medium.com

What is the Golden Ratio?

You know you?re truly geeking out when you?re gushing about how beautiful a number is, but hey this number is pretty?

medium.com

Why does a + b = c?

Visual Proof of the Pythagorean Theorem

medium.com

12

No Responses

Write a response