Boolean logic

This chapter will talk about two things:

A simple abstract mathematical system

Recall that one of the components of an abstract mathematical system is a collection of objects . The simplest abstract mathematical system that is not trivial has only two objects in its collection.

Because we are talking about an abstract mathematical system, we can name the two objects anything we want. This is a very important point.

(Computer programmers sometimes write programs that use abstract objects, and, when they need to name these objects, sometimes use the words foo and bar for obscure reasons. The use of these names usually signifies that the objects named do not have descriptive names or the programmer is too lazy to think of one.)

Since we will need names for the two objects of our system, let's just decide to use the literal symbols T and F. (This choice of names is not entirely capricious, since later, when we use our abstract system to create mathematical models, the letters have a nice real world interpretation.)

So, where are we? We have a collection of two objects and now we need some rules to manipulate these objects. The rules will look very similar to rules of arithmetic, such as 1+1=2 except that the rules will use T and F as the literal symbols of our collection instead of numbers and the operator symbols will look different.

The rules of the simple abstract mathematical system

How shall we describe the rules of our system? Because we only have two objects in our collection, each rule is quite simple and we can just list all the possibilities.

Look at the following figure. Across the top you will see a set of tabs. Make sure that the tab labeled Negation is selected.

In the greenboard area you will see a diagram. It is divided as follows:

Boolean operator

Notice in the figure that the left column simply lists all possible literal values of the variable p. The right column lists the literal value that the operator converts each left literal value to. In other words, the right column actually defines the operator. If we change any of the literal values in the right column, we have changed the definition of the operator.

Boolean negation

This figure is now a complete definition of what we call the Boolean negation rule. Notice that the operator, called the negation operator when applied to an object of our collection, simply produces the other object of our collection, i.e., a T gets turned into an F and an F gets turned into a T.

The negation operator only applies to one object at a time. For this reason, it is called a unary operator. Next we will look at a rule that applies to two objects at a time.

Stretch your mind

  • Are there any other unary operators possible in Boolean logic?
  • Why would an abstract mathematical system with only one object in its collection be not very useful?
  • Boolean and

    Click on the And tab of the figure. You will see a similar diagram as before except that there are now three columns. and two variables, p and q.

    The left two columns list all possible pairs for the two variables, resulting in four rows. You should verify for yourself that all pairs are accounted for.

    Stretch your mind

  • How many rows will the table have if there are three variables?
  • The operator symbol is an inverted V and is written between the two variable symbols. The operator is called the Boolean and operator.

    So what does the Boolean and operator do with its objects? Notice that the literal value in the right column is only T when both of the literal values in the left two columns are T. In other words T and T both have the literal value of T. This property give meaning to the use of the word and in the rules description.

    Boolean or

    Click on the Or tab of the figure. You will see a similar diagram to the And tab except the operator is now V and the rightmost column has different literal value entries. The operator is called the Boolean or operator.

    Under construction

    Boolean exclusive or

    Under construction

    Boolean implication

    Under construction

    Boolean equivalence

    Under construction

    Next section: Logical formulas