2-2
GENERAL LOGIC
Consider the following example:
If it is true that all Navy ships are gray and the USS
Lincoln is a
Navy ship, then you would reach the logical conclusion that
the USS Lincoln is gray.
To reach a logical conclusion, you
must assume the qualifying statement is a condition of truth. For
each statement there is also a
corresponding false condition. The statement "USS Lincoln is a Navy ship"
is true; therefore, the statement
"USS Lincoln is not a Navy ship" is false. There are
no in-between
conditions.
Computers operate on the principle of logic and use
the TRUE and FALSE logic
conditions of a
logical statement to make a programmed decision.
The conditions of a statement can
be represented by symbols (variables); for instance, the statement
"Today is payday" might be
represented by the symbol P. If today actually is payday, then P is TRUE. If
today is not payday, then P is
FALSE. As you can see, a statement has two conditions. In computers,
these two conditions are
represented by electronic circuits operating in two LOGIC
STATES. These
logic states are 0 (zero) and 1 (one).
Respectively, 0 and 1 represent the FALSE and TRUE conditions of
a statement.
When the TRUE and FALSE conditions
are converted to electrical signals, they are referred to as
LOGIC LEVELS
called HIGH
and LOW.
The 1 state might be represented by the presence of an
electrical signal (HIGH), while the
0 state might be represented by the absence of an electrical signal
(LOW).
If the statement "Today is payday"
is FALSE, then the statement "Today is NOT payday" must be
TRUE. This is called the COMPLEMENT
of the original statement. In the case of computer math,
complement is defined as the
opposite or negative form of the original statement or variable. If today
were payday, then the statement
"Today is not payday" would be FALSE. The complement is shown by
placing a bar, or VINCULUM, over
the statement symbol (in this case, P ). This
variable is spoken as
NOT P. Table 2-1 shows this concept and the relationship
with logic states and logic levels.
Table 2-1. Relationship
of Digital Logic Concepts and Terms
Example 1: Assume today is payday
STATEMENT SYMBOL
CONDITION
LOGIC STATE
LOGIC LEVEL
Original:
TODAY IS PAYDAY P
TRUE 1
HIGH
Complement: TODAY IS NOT PAYDAY
P
FALSE 0
LOW Example 2:
Assume today is not payday
Original:
TODAY IS NOT PAYDAY P
FALSE 0
LOW
Complement: TODAY IS NOT PAYDAY
P
TRUE 1
HIGH