Back to the Table of Contents

Numbers and Their Application - Lesson 6

To Tell the Truth

Lesson Overview

Truth Tables

The last lesson introduced the concept of logical statements and connectives used to joined them into compound statements called arguments. Here we explore the conclusion of these arguments as the input statements take on various values of true or false. Since the connectives we are studying (and, or, if-then, iff) and negation (not) are truth-functional (its truth value can be figured out solely on the basis of its components), we can evaluate these arguments by exhaustively listing all possible values these inputs may take on. If there are n components, there will be 2n rows in the corresponding truth table.

Parentheses should be used when combining multiple compound statements together with connectives. If parentheses are omitted, the following order of operation should be assumed: biconditional (highest), conditional, conjunction/disjunction and negation (lowest).

We have already seen in lesson one the relationship between union (disjunction) and or as well as intersection (conjunction) and and. Here we will also introduce various symbols used when drawing logic diagrams, give truth tables in two different forms for a few other common operator, and explore how and and or are similar to switches in series and parallel circuits.

And01
0 00
1 01
  
Or01
001
111
  
Eor01
001
110
  
pNot p
01
10

Ands, Ors, Exclusive Ors

Since the and and or tables above are so similar to the multiplication and addition tables seen earlier, and is often symbolized by • or ^ (similar to intersection) and or is often symbolized by + or (similar to union). | is also often used for or. Be very careful when programming since conventions vary widely between programming language! Languages such as C and C++ introduce additional confusion by differentiating between bitwise (operating on each bit in a string) and logical operators (only treating the value as zero or not zero).

Augustus DeMorgan's (1806-1871) major contribution to mathematics was his reforming logic and establishing symbolism for algebra. He was the one to define and introduce mathematical induction, which up to that point was still unclear. One major result known as DeMorgan's Law can be summarized as below.
DeMorgan's Law     (A B)' = A' B' and (A B)' = A' B'

This is often equivalently stated using ^ and and overhead lines for nots (instead of primes for the complementary set). The major author debugged a significant number of COBOL programs by checking logic of this form.

Around the same time, George Boole (1815-1864) was also establishing logic symbolism. Boolean Algebra, which is a foundation for computers, is an algebra of sets with the operators of union and intersection. Equivalently it is an algebra with the numbers 0 and 1 and operators of and and or. More details are available in lesson 13.

As noted above, truth tables appear in two basic forms: 1) as multiplication or addition style tables; and 2) as an exhaustive list of possible values. Take a moment and compare these truth tables with those obtained in homework 2 regarding the addition and multiplication of even numbers. Then, compare the format below with the earlier format in this lesson.

pq ~p~qp^q p|qp eor q p=>qp<=>q p nand qp nor q p neor q p and ~p p or ~p
00110001111101
01100111010001
10010110010001
11001101100101

Often in a truth table the symbol T for true is used for 1 and the symbol F for false is used for 0.

Note how neor and the biconditional are the same.
Another common name for the biconditional is equivalence.

If a proposition contains only 1's (T's) in the last column of its truth table, it is a tautology.
(See p or ~p in the table above.)

If a proposition contains only 0's (F's) in the last column of its truth table, it is a contradiction.
(See p and ~p in the table above.)

An argument is valid if it has good logical structure, otherwise it is invalid. An argument is sound if and only if it is valid and has true premises, otherwise it is unsound. One also uses the following terms to identify statement requirements in A implies B: necessary: (B cannot be true unless A is true, or sufficient: A cannot be true unless B is true. A fallacy uses a false premise, invalid reasoning, or vague/ambiguous language. One also calls a set of statements either inconsistent if they lead to a contradiction or consistent if not. A set of statements is complete if one can determine for any combination of statements a result (i.e. prove it) or else incomplete. Kurt Gödel in 1931 showed that no complete system that admits the natural numbers (Peano axioms) can be consistent, which is now known as Gödel Incompleteness Theorem. Thus any useful logical system must either be inconsistent or incomplete. This derailed attempts to axiomize all of mathematics.

If a proposition contains both 1's and 0's (T's and F's) in the last column of its truth table, it is a contingency.

Forming truth tables like this is a common way to compare the validity of two different statements. Actually, few of the 16 possible combinations of 0's and 1's are missing in the table above. A former teacher of the major author added a let operator to complete the list—those were his initials!

Logic Symbols

Given below are three symbols commonly used to represent inverters (nots) in electronic diagrams. Note the little circle on the two on the left. The absence of the little circle on the one on the right can leave some ambiguity since the same symbol can be used to represent a non-inverting buffer (gate expander).

Given below are the corresponding symbols for ands, and ors. An and-gate is equivalent to a series circuit as illustrated in the diagram below right, whereas an or-gate is equivalent to a parallel circuit also illustrated below right.

Nands, Nors, etc.

Compare the nand's and nor's in the table above with those below. Since nand's and nor's can serve as inverters (a not), (by tying both inputs to the source), any logic can be generated using one of them exclusively.
Nand01
0 11
1 10
 
Nor01
0 10
1 00
 
Neor01
0 10
1 01
   

Logic Equations

Electronic logic was implemented as vacuum tubes ("valves") in the early computers (1950's, generation 1), and with diodes/transistors (DTL, 1960's, generations 2 and 3, with generation 3 being packaged in integrated circuits (ICs)). The 1970's were dominated by TTL (transistor-transistor) logic. In DTL the nor-gate was basic whereas in TTL the nand-gate was basic. A typical basic nor gate and a nand-gate based Set-Reset flip-flop are shown below. Many different kinds of flip-flops exist: clocked, D-type, J-K type, J-K master-slave, edge triggered, etc.. (Add link here to good electronic site.)
Basic TTL nor gateNand-gate Set-Reset flip-flop

Today, complex microprocessors utilizing millions even billions of logic gates are routinely etched onto silicon chips. However, these basic logic gates composed of several transistors (invented in 1947) are still an important part of the fundamental design. These logic gates are built up into more complex structures such as flip-flops, memory elements, [shift] registers, counters, decoders, multiplexors, adders, etc. Often many such microprocessors are etched at the same time on one big silicon wafer. The Pentium 4 by INTEL now running at speeds of up to 3.73GHz! demonstrate amazing technological progress.

Some computers of the 1960's and 1970's (SDS/Xerox Sigma) were documented using logic equations. A typical logic equation might read as shown below left. (This can be interpret to say that the negation of the signal representing the family of read/write direct instructions (hexadecimal operation codes .6C or .6D) is generated by the upper nibble being a 6 and the lower nibble being .C (lowest order bit being ignored). Here, hex is indicated by the leading period.) A logic diagram is also shown below right. Note how in diagram form this takes up additional space and uses graphic symbols. The logic equation format is very compact and was easily printed using 60's technology.

NFARWD=I . OU6.(O4.O5.NO6)

BACK HOMEWORK ACTIVITY CONTINUE