#24) Logic: Bringing It All Together


Hello, and welcome back to "Always Be Better" with Mel Windham.

Today we continue our adventures in Logic. If you haven't already, you should first watch the foundation sessions. Here's a link to the first three videos. 


It takes about 30 minutes to get through them.

Once you come back to this session, we will bring together all of the basic principles. 

Let's first review what we've learned.
  • First, we can reduce English statements into symbols, which can allow us to analyze the underlying logic more easily.
    • Example: 

If Sam is human, he has a face.

A -> B

Sam is human.

A

Therefore, Sam has a face.

B

  • And we learned how the answer to a logical question can either be TRUE, FALSE, or UNDETERMINED. TRUE and FALSE can be shown as 1 and 0 respectively.
  • We've learned how logic gates can capture the relations between two logical ideas.
    • Example:


AND



A=0

A=1

B=0

0

0

B=1

0

1


  • And then we used logic gate tables to graphically analyze logical results.
    • Example:


AND



A=0

A=1

B=0

0

0

B=1

0

1


If we bring all these ideas together and present them slightly differently, it can allow us to open wide the door to much more advanced logical concepts. And get this ... no matter how complex we go, they are all simply extensions of our fundamental principles. In other words, even in the longest, craziest logical proof, we should be able to follow each individual step -- ones and zeros -- logic gates -- and so on -- easy peasy.

So, let me introduce you to the all powerful Truth Table! We'll start with our AND gate from before, and start rewriting it like this ... let's start with a column for lower-case "a." This is the same thing as upper-case "A," but it just takes up less room -- you'll see why in a bit. Let's add a column for "b." And finally, a column for "a AND b."

a

b

a AND b


But wait -- that word "AND" is taking up a lot of room. So, let's shorten it. A common shorthand is to use an upside-down "V" symbol. You can remember that it means AND because it looks like an "A" with the horizontal line removed. This allows us to tighten up our columns:

a

b

a b


And now -- we can transform our AND gate to this truth table by populating it with 1's and 0's. First, we fill in the inputs: "a" and "b." Just like we see in our original AND gate there are four combinations to consider. There's 0 and 0, 0 and 1, 1 and 0, and last but not least: 1 and 1.

a

b

a b

0

0


0

1


1

0


1

1



Then we can fill in the "a AND b" column. We can either use our original AND gate, or we should be able to do this by memory now:

a

b

a b

0

0

0

0

1

0

1

0

0

1

1

1


Now -- take a quick moment to compare this Truth Table with the AND gate. How are they similar? How are they different?

So far so good? We're not done yet! Get ready to witness the power of a fully functional Truth Table!

Let's add another column -- for the OR gate. The shorthand for OR is the "V" sign, an upside-down AND, because -- well -- they're kind of opposites -- in a way. Okay -- I have no idea why they use these signs! Let's just fill in the 1's and 0's.

a

b

a b

a b

0

0

0

0

0

1

0

1

1

0

0

1

1

1

1

1


And why stop there? Let's throw in the NOT-a gate. Remember that NOT is represented by a tilde. Let's fill in the values...

a

b

a b

a b

~a

0

0

0

0

1

0

1

0

1

1

1

0

0

1

0

1

1

1

1

0


We can even add more inputs. So, let's go back and add "c" into the mix. This will add in 4 more rows. The original four row with c=0, and four more rows with c=1, giving us all 8 possible combinations of 1's and 0's. And we can fill out the rest of the table like this ...

a

b

c

a b

a b

~a

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

0

1

0

1

1

0

1

1

0

0

0

1

0

0

1

0

1

1

0

1

1

1

0

1

0

1

0

1

1

1

1

1

0


And now we can do a three-way AND with "a," "b," and "c." To do this, we just do the AND of the third and fourth columns. We can also do a three-way OR by taking the OR of columns 3 and 5.

a

b

c

a b

a b

~a

(a b) c

(a b) c

0

0

0

0

0

1

0

0

0

1

0

0

1

1

0

1

1

0

0

0

1

0

0

1

1

1

0

1

1

0

0

1

0

0

1

0

0

1

0

1

0

1

1

0

1

1

0

1

1

0

1

0

1

0

0

1

1

1

1

1

1

0

1

1


And one last magic trick. First we're going to need two more columns: "NOT b," and we'll also need "NOT a AND NOT b." "NOT b" comes from the NOT of column 2. And the last column comes from taking the AND of columns 6 and 9.

a

b

c

a b

a b

~a

(a b) c

(a b) c

~b

~a ~b

0

0

0

0

0

1

0

0

1

1

0

1

0

0

1

1

0

1

0

0

1

0

0

0

1

0

0

1

1

0

1

1

0

1

1

0

0

1

0

0

0

0

1

0

0

1

0

1

1

1

0

1

1

0

1

1

0

1

0

0

1

0

1

0

1

0

0

1

1

0

1

1

1

1

1

0

1

1

0

0


And for the kicker -- let's take the NOT of the fifth column -- "a OR b." Do you see now why we switched to lower-case letters and shortened symbols?

a

b

c

a b

a b

~a

(a b) c

(a b) c

~b

~a ~b

~ (a b)

0

0

0

0

0

1

0

0

1

1

1

0

1

0

0

1

1

0

1

0

0

0

1

0

0

0

1

0

0

1

1

0

0

1

1

0

1

1

0

0

1

0

0

0

0

0

1

0

0

1

0

1

1

1

1

0

1

1

0

1

1

0

1

0

0

0

1

0

1

0

1

0

0

1

1

0

0

1

1

1

1

1

0

1

1

0

0

0


But wait! Look at that -- see the last two columns? They are exactly the same. With our all-powerful Truth Table, we have just proven one of the DeMorgan Laws: ~a  ~b = ~ (a  b).

I know -- this all may look crazy, but this Truth Table is truly a powerful tool. We'll see more of these as we attack more advanced topics in preparation for attacking even more interesting topics, such as politics, and even religion.

If you'd like to learn more of the gory details, you can look up the wiki on "Propositional Calculus," which is the official name of what we've just learned. And it can tell you anything you want to know -- stuff that we talked about and even more. 

[Video shows tour of webpage] 

Remember this [our first principle]? We have TRUE and FALSE. You got P's and Q's -- they like P's and Q's instead of A's and B's. 

And look -- there's some OR's, and there's an AND, and there's that IF-THEN thing.

[Tour ends]

So, check it out. If you want to learn more, then come here [wiki page].

We probably won't get this complex, but it's all there if you want to see it. This is stuff we computer nerds had to learn early on in college.

I hope you've enjoyed this journey into Logic, and I hope you enjoy what comes next. In our next Logic video, I'll introduce you to logic puzzles -- an excellent way to practice what we've learned. And then I can show some actual applications and we'll go from there.

This week's challenge: think about all these principles and play around. Try out the Truth Table to see if you can prove some of those statements on the wiki page. See if you can already find applications in life and start analyzing logic. Whatever you do, just have fun with it.

Thank you for watching, and remember, we can "Always Be Better."

Comments

Popular posts from this blog

#4) The Beginnings of a Video Series

#48) A Walk in the Park

#46) Fifteen More Minutes of Fame