Boolean Logic Introduction

Resources

Video Script

This chapter deals with Boolean logic, which is an important foundational concept in computer programming. Before we can talk about that, however, we need to know where it came from.

That leads us to Aristotle, way back in the 300s BCE. As you may know, Aristotle is one of the fathers of modern philosophy and logic among many other things. He studied under Plato (who himself was taught by Socrates) and was the teacher of Alexander the Great. He pretty much affected the entire world of western philosophy that came after him. One of his major contributions was the idea of using formal logic to prove a point.

In this form of logic, also known as Aristotelian logic, a point is proven based on a series of premises. For example, we could start with the premises “Socrates is a man” and “All men are mortal.” Premises in this sense are intended to be truths in the world that everyone would agree on. Then, we could use the tools in Aristotelian logic to reach a logical conclusion. In this case, we could say “Socrates is a mortal” based on those premises. Honestly, when you think about this simple example, it should quickly make sense. With the tools Aristotle created, you could take known facts and use them to prove many profound statements.

Skip ahead a few thousand years, and we come to George Boole. In 1854, he published a book called “An Investigation of the Laws of Thought” in which he tried to apply the rapidly growing field of mathematics to the laws of logic. His goal was to reduce something as complex as logic to simple mathematical equations. With the right rules in place, even a complex logical statement can be completely proved (or disproved) using the same algebraic techniques they used to understand other parts of the world.

In fact, George Boole’s book is available free online via Project Gutenberg! So, feel free to look it up if you are interested in this field.

What he created, in essence, was Boolean Logic. Here is the same example from before, loosely translated into Boolean logic. In this example, we are stating that facts A and B are true, and that facts B and C are true are premises. We’ll learn about the symbols used in Boolean logic, such as this triangular symbol for “and” later in this chapter. Of course, we can use those premises to conclude that A and C are true.

On the next page, we’ll cover all of the symbols in Boolean logic and how they work.