27.12.2021 Views

2.Digital Design with CPLD Applications _ VHDL - Dueck

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

28 CHAPTER 2 • Logic Functions and Gates

FIGURE 2.2

2-Input AND Gate Symbols

Algebraically, this is written:

Y A B

Pronounce this expression “Y equals A AND B.” The AND function is similar to multiplication

in linear algebra and thus is sometimes called the logical product. The dot between

variables may or may not be written, so it is equally correct to write Y AB. The

logic circuit symbol for an AND gate is shown in Figure 2.2 in both distinctive-shape and

IEEE/ANSI rectangular-outline form. The qualifying symbol in IEEE/ANSI notation is the

ampersand (&).

We can also represent the AND function as a set of switches in series, as shown in Figure

2.3. The circuit consists of a voltage source, a lamp, and two series switches. The lamp

turns on when switches A AND B are both closed. For any other condition of the switches,

the lamp is off.

Voltage

source

A

A

B

B

Lamp

FIGURE 2.3

AND Function Represented by Switches

Table 2.3 3-input AND

Function Truth Table

A B C Y

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 1

Table 2.3 shows the truth table for a 3-input AND function. Each of the three inputs

can have two different values, which means the inputs can be combined in 2 3 8 different

ways. In general, n binary (i.e., two-valued) variables can be combined in 2 n ways.

Figure 2.4 shows the logic symbols for the device. The output is HIGH only when all

inputs are HIGH.

FIGURE 2.4

3-Input AND Gate Symbols

OR Function

Table 2.4 2-input OR

Function Truth Table

A B Y

0 0 0

0 1 1

1 0 1

1 1 1

KEY TERMS

OR gate A logic circuit whose output is HIGH when at least one input (e.g., A

OR B OR C) is HIGH.

Logical sum OR function.

The OR function combines two or more input variables in such a way as to make the output

variable HIGH if at least one input is HIGH. Table 2.4 gives the truth table for the 2-input

OR function.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!