Module 13 - Introduction to Number Systems and Logic
Navy Electricity and Electronics Training Series (NEETS)
Chapter 2:  Pages 2-1 through 2-10

Module 13 − Introduction to Number Systems and Logic

Pages i, 1−1, 1−11, 1−21, 1−31, 1−41, 1−51, 1−61, 2−12−11, 2−21, 2−31, 3−1, 3−11, 3−21, 3−31, 3−41, Index

 

Chapter 2

 

FUNDAMENTAL LOGIC Circuits

 

Learning Objectives

 

 

Upon completing this chapter, you should be able to do the following:

 

1.    Identify general logic conditions, logic states, logic levels, and positive and negative logic as these terms and characteristics apply to the inputs and outputs of fundamental logic circuits.

 

2.    Identify the following logic circuit gates and interpret and solve the associated Truth Tables:

 

a.   and

 

b.    OR

 

c.   Inverters (NOT circuits)

 

d.    Nand

 

e.   NOR

 

3.    Identify variations of the fundamental logic gates and interpret the associated Truth Tables.

 

4.    Determine the output expressions of logic gates in combination.

 

5.    Recognize the laws, theorems, and purposes of Boolean algebra.

 

Introduction

 

In chapter 1 you learned that the two digits of the binary number system can be represented by the state or condition of electrical or electronic devices. a binary 1 can be represented by a switch that is closed, a lamp that is lit, or a transistor that is conducting. Conversely, a binary 0 would be represented by the same devices in the opposite state: the switch open, the lamp off, or the transistor in cut-off.

 

In this chapter you will study the four basic logic gates that make up the foundation for digital equipment. You will see the types of logic that are used in equipment to accomplish the desired results. This chapter includes an introduction to Boolean algebra, the logic mathematics system used with digital equipment. Certain Boolean expressions are used in explanation of the basic logic gates, and their expressions will be used as each logic gate is introduced.

 

COMPUTER LOGIC

 

Logic is defined as the science of reasoning. In other words, it is the development of a reasonable or logical conclusion based on known information.

 

 

2-1

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

Relationship of Digital Logic Concepts and Terms - RF Cafe

 

 

2-2

In some cases, more than one variable is used in a single expression. For example, the expression AB C D is spoken "A and B and NOT C and D."

 

Positive and Negative LOGIC

 

To this point, we have been dealing with one type of LOGIC POLARITY, positive. Let's further define logic polarity and expand to cover in more detail the differences between positive and negative logic.

 

Logic polarity is the type of voltage used to represent the logic 1 state of a statement. We have determined that the two logic states can be represented by electrical signals. Any two distinct voltages may be used. For instance, a positive voltage can represent the 1 state, and a negative voltage can represent the 0 state. The opposite is also true.

 

Logic circuits are generally divided into two broad classes according to their polarity - positive logic and negative logic. The voltage levels used and a statement indicating the use of positive or negative logic will usually be specified on logic diagrams supplied by manufacturers.

 

In practice, many variations of logic polarity are used; for example, from a high-positive to a low- positive voltage, or from positive to ground; or from a high-negative to a low-negative voltage, or from negative to ground. a brief discussion of the two general classes of logic polarity is presented in the following paragraphs.

Positive Logic

 

Positive logic is defined as follows: If the signal that activates the circuit (the 1 state) has a voltage level that is more Positive than the 0 state, then the logic polarity is considered to be Positive. Table 2-2 shows the manner in which positive logic may be used.

 

Table 2-2. - Examples of Positive Logic

Examples of Positive Logic - RF Cafe

 

As you can see, in positive logic the 1 state is at a more positive voltage level than the 0 state.

 

Negative Logic

 

As you might suspect, negative logic is the opposite of positive logic and is defined as follows: If the signal that activates the circuit (the 1 state) has a voltage level that is more Negative than the 0 state, then the logic polarity is considered to be Negative. Table 2-3 shows the manner in which negative logic may be used.

 

 

2-3

 

 

Table 2-3. - Examples of Negative Logic

Examples of Negative Logic - RF Cafe

 

Note: The logic level Low now represents the 1 state. This is because the 1 state voltage is more negative than the 0 state.

 

In the examples shown for negative logic, you notice that the voltage for the logic 1 state is more negative with respect to the logic 0 state voltage. This holds true in example 1 where both voltages are positive. In this case, it may be easier for you to think of the TRUE condition as being less positive than the FALSE condition. Either way, the end result is negative logic.

 

The use of positive or negative logic for digital equipment is a choice to be made by design engineers. The difficulty for the technician in this area is limited to understanding the type of logic being used and keeping it in mind when troubleshooting.

 

Note:

 

UNLESS OTHERWIsE NoteD, The REMAINDER of THIs BOOK WILL DEAL ONLY WITH Positive LOGIC.

 

LOGIC InputS and OutputS

 

As you study logic circuits, you will see a variety of symbols (variables) used to represent the inputs and outputs. The purpose of these symbols is to let you know what inputs are required for the desired output.

 

If the symbol a is shown as an input to a logic device, then the logic level that represents a must be High to activate the logic device. That is, it must satisfy the input requirements of the logic device before the logic device will issue the TRUE output.

 

Look at view a of figure 2-1. The symbol X represents the input. As long as the switch is open, the lamp is not lit. The open switch represents the logic 0 state of variable X.

 

 

2-4

 

 

Logic switch: A. Logic 0 state; B. Logic 1 state - RF Cafe

Figure 2-1. - Logic switch: A. Logic 0 state; B. Logic 1 state.

 

Closing the switch (view B), represents the logic 1 state of X. Closing the switch completes the circuit causing the lamp to light. The 1 state of X satisfied the input requirement and the circuit therefore produced the desired output (logic High); current was applied to the lamp causing it to light.

 

If you consider the lamp as the output of a logic device, then the same conditions exist. The TRUE (1 state) output of the logic device is to have the lamp lit. If the lamp is not lit, then the output of the logic device is FALSE (0 state).

 

As you study logic circuits, it is important that you remember the state (1 or 0) of the inputs and outputs.

 

So far in this chapter, we have discussed the two conditions of logical statements, the logic states representing these two conditions, logic levels and associated electrical signals and positive and negative logic. We are now ready to proceed with individual logic device operations. These make up the majority of computer circuitry.

 

As each of the logic devices are presented, a chart called a TRUTH TABLE will be used to illustrate all possible input and corresponding output combinations. Truth Tables are particularly helpful in understanding a logic device and for showing the differences between devices.

 

The logic operations you will study in this chapter are the and, OR, NOT, Nand, and NOR. The devices that accomplish these operations are called logic gates, or more informally, gates. These gates are the foundation for all digital equipment. They are the "decision-making" circuits of computers and other types of digital equipment. By making decisions, we mean that certain conditions must exist to produce the desired output.

 

In studying each gate, we will introduce various mathematical SYMBOLS known as BOOLEAN ALGEBRA expressions. These expressions are nothing more than descriptions of the input requirements necessary to activate the circuit and the resultant circuit output.

 

 

2-5

 

 

The and GATE

 

The and gate is a logic circuit that requires all inputs to be TRUE at the same time in order for the output to be TRUE.

 

LOGIC SYMBOL

 

The standard symbol for the and gate is shown in figure 2-2. Variations of this standard symbol may be encountered. These variations become necessary to illustrate that an and gate may have more than one input.

 

AND gate - RF Cafe

Figure 2-2. - and gate.

 

If we apply two variables, a and B, to the inputs of the and gate, then both a and B would have to be TRUE at the same time to produce the desired TRUE output. . The symbol f designates the output function. The Boolean expression for this operation is f = A·B or f = AB. The expression is spoken, "f = a and B." The dot, or lack of, indicates the and function.

 

and GATE Operation

 

We can demonstrate the operation of the and gate with a simple circuit that has two switches in series as shown in figure 2-3. You can see that both switches would have to be closed at the same time to light the lamp (view A). Any other combination of switch positions (view B) would result in an open circuit and the lamp would not light (logic 0).

 

AND gate equivalent circuit: A. Logic 1 state; B. Logic 0 state - RF Cafe

Figure 2-3. - and gate equivalent circuit: A. Logic 1 state; B. Logic 0 state.

 

Now look at figure 2-4. Signal a is applied to one input of the and gate and signal B to the other.

At time T0, both inputs are Low (logic 0) and f is Low. At T1, a goes High (logic 1); B remains Low; and as a result, f remains Low. At T2, a goes Low and B goes High; f, however, is still Low, because the proper input conditions have not been satisfied (A and B both High at the same time). At T4, both A

 

 

2-6

and B are High. As a result, f is High. The input requirements have been satisfied, so the output is High (logic 1).

 

AND gate input and output signals - RF Cafe

Figure 2-4. - and gate input and output signals.

 

TRUTH TABLE

 

Now let's refer to figure 2-5. As you can see, a Truth Table and a Table of Combinations are shown. The latter is a deviation of the Truth Table. It uses the High and Low logic levels to depict the gate's inputs and resultant output combinations rather than the 1 and 0 logic states. By comparing the inputs and outputs of the two tables, you see how one can easily be converted to the other (remember, 1 = High and 0 = Low). The Table of Combinations is shown here only to familiarize you with its existence, it will not be seen again in this book. As we mentioned earlier, the Truth Table is a chart that shows all possible combinations of inputs and the resulting outputs. Compare the and gate Truth Table (figure 2-5) with the input signals shown in figure 2-4.

 

AND gate logic symbol, Truth Table, and Table of Combinations - RF Cafe

Figure 2-5. - and gate logic symbol, Truth Table, and Table of Combinations.

 

 

2-7

The first combination (A = 0, B = 0) corresponds to T0  in figure 2-4; the second to T1; the third to T2; and the last to T4. When constructing a Truth Table, you must include all possible combinations of the inputs, including the all 0s combination.

 

A Truth Table representing an and gate with three inputs (X, Y, and Z) is shown below. Remember that the two-input and gate has four possible combinations, with only one of those combinations providing a High output. An and gate with three inputs has eight possible combinations, again with only one combination providing a High output. Make sure you include all possible combinations. To check if you have all combinations, raise 2 to the power equal to the number of input variables. This will give you the total number of possible combinations. For example:

 

EXAMPLE 1-AB = 22  = 4 combinations

 

EXAMPLE 2-XYZ = 23  = 8 combinations

 

Truth Table representing an AND gate with three inputs (X, Y, and Z) - RF Cafe

 

As with all and gates, all the inputs must be High at the same time to produce a High output. Don't be confused if the complement of a variable is used as an input. When a complement is indicated as an input to an and gate, it must also be High to satisfy the input requirements of the gate. The Boolean expression for the output is formulated based on the TRUE inputs that give a TRUE output. Here is an adage that might help you better understand the and gate:

 

In order to produce a 1 output, all the inputs must be 1. If any or all of the inputs is/are 0, then the output will be 0.

 

Referring to the following examples should help you cement this concept in your mind. Remember, the inputs, whether the original variable or the complement must be high in order for the output to be high. The three examples given are all and gates with two inputs. Keep in mind the Boolean expression for the output is the result of all the inputs being High.

 

 

2-8

 

 

AND gate logic with two inputs, Truth Table - RF Cafe

Figure 2-5a. - and gate logic with two inputs, Truth Table.

 

You will soon be able to recognize the Truth Table for the other types of logic gates without having to look at the logic symbol.

 

Q1.   What is defined as "the science of reasoning?"

 

Q2.   With regard to computer logic circuits, what is meant by "complement?"

 

Q3.   What are the complements of the following terms?

 

    a.    Q

 

    b.    R

 

    c.  V

 

    d.    Z

 

Q4.   If logic 1 = -5 vdc and logic 0 = -10 vdc, what logic polarity is being used?

 

Q5.   If logic 1 = +2 vdc and logic 0 = -2 vdc, what logic polarity is being used?

 

Q6.   If logic 1 = -5 vdc and logic 0 = 0 vdc, what logic polarity is being used?

 

Q7.   What is the Boolean expression for the output of an and gate that has R and S as inputs?

 

Q8.   What must be the logic state of R and S to produce the TRUE output?

 

Q9.   How many input combinations exist for a four-input and gate?

 

 

2-9

 

 

 The OR GATE

 

The OR gate differs from the and gate in that only ONE input has to be High to produce a High output. An easy way to remember the OR gate is that any High input will yield a High output.

 

LOGIC SYMBOL

 

Figure 2-6shows the standard symbol for the OR gate. The number of inputs will vary according to the needs of the designer.

 

OR gate - RF Cafe

Figure 2-6. - OR gate.

 

The OR gate may also be represented by a simple circuit as shown in figure 2-7. In the OR gate, two switches are placed in parallel. If either or both of the switches are closed (view A), the lamp will light. The only time the lamp will not be lit is when both switches are open (view B).

 

OR gate equivalent circuit: A. Logic 1 state; B. Logic 0 state - RF Cafe

Figure 2-7. - OR gate equivalent circuit: A. Logic 1 state; B. Logic 0 state.

 

Let's assume we are applying two variables, X and Y, to the inputs of an OR gate. For the circuit to produce a High output, either variable X, variable Y, or both must be High. The Boolean expression for this operation is f = X+Y and is spoken "f equals X OR Y." The plus sign indicates the OR function and should not be confused with addition.

 

OR GATE Operation

 

Look at figure 2-8. At time T0, both X and Y are Low and f is Low. At T1, X goes High producing a High output. At T2  when both inputs go Low, f goes Low. When Y goes High at T3, f

 

 

2-10

NEETS Modules
- Matter, Energy, and Direct Current
- Alternating Current and Transformers
- Circuit Protection, Control, and Measurement
- Electrical Conductors, Wiring Techniques, and Schematic Reading
- Generators and Motors
- Electronic Emission, Tubes, and Power Supplies
- Solid-State Devices and Power Supplies
- Amplifiers
- Wave-Generation and Wave-Shaping Circuits
- Wave Propagation, Transmission Lines, and Antennas
- Microwave Principles
- Modulation Principles
- Introduction to Number Systems and Logic Circuits
- - Introduction to Microelectronics
- Principles of Synchros, Servos, and Gyros
- Introduction to Test Equipment
- Radio-Frequency Communications Principles
- Radar Principles
- The Technician's Handbook, Master Glossary
- Test Methods and Practices
- Introduction to Digital Computers
- Magnetic Recording
- Introduction to Fiber Optics
Note: Navy Electricity and Electronics Training Series (NEETS) content is U.S. Navy property in the public domain.