We have already seen that statements can be either true or false. Within the symbolic formalism that we are introducing, we will use the number one, 1, to represent true, and the number zero, 0, to represent false:
We say that 1 or 0 are the possible truth values of a statement, meaning simply that a statement with a truth value of 1 is true, and one with a truth value of 0 is false. Since we are dealing in a system in which there are only two possible truth values, we say that this is a binary system of logic.
We say that the operation of taking the conjunction of two statements is a truth-functional operation since the resulting compound statement is itself either true or false depending on the truth values of its component statements. (We will only be interested in truth-functional operators in this course.)
The conjunction of two statements is defined to be true only if both of its components are true; otherwise it is false.
Thus, for example, if A = 1 and B = 0, then A*B = 0, since A*B = 1only ifA = 1andB = 1.
We can completely specify the conjunction operator by creating a table that shows all of the possible combinations of the truth values for the components of the conjunction along with the truth value of the result of the conjunction operation. Such a table is called a truth table since it gives the truth value of every possible situation encountered by the conjunction operator.
The truth table for the conjunction operator is as follows:
Conjunction Truth Table
|
A
|
B
|
A*B
|
0
|
0
|
0
|
1
|
0
|
0
|
0
|
1
|
0
|
1
|
1
|
1
|
|
We can determine in advance how many rows will be in the truth table for a given logic statement as follows. (This will not necessarily be an obvious thing in practice, so it will be important for us to be able to compute it in advance!) The quantities A and B above are called the components of the statement; in what lies ahead, we will call them the inputs to the logical statement. If we let inputs represent the number of inputsin the given statement (two in this case, A and B), then the number of rows in the truth table for that statement will be given by 2inputs (that is, the number 2 raised to the number of inputs to the statement).
For example, in the conjunction statement considered above, A*B, there are two inputs (A and B), so that inputs = 2. The number of rows in a truth table for this statement (which specifies the number of possible combinations of component values in the expression) is given by 2inputs. In this case, we therefore have that
2 inputs = 2 2 = 4,
which is seen to be the number of rows in the truth table above. (This may seem fairly obvious for this simple case, but how many rows should you expect to have in a truth table for a statement containing 4 binary inputs?)
|