The AND gate is one of the basic gates that can be combined to form any logic function. An AND gate can have two or more inputs and performs what is known as logical multiplication.

The AND Gate

The AND gate is composed of two or more inputs and a single output, as indicated by the standard logic symbols shown in Figure 1. Inputs are on the left, and the output is on the right in each symbol. Gates with two inputs are shown; however, an AND gate can have any number of inputs greater than one. Although examples of both distinctive shape symbols and rectangular outline symbols are shown, the distinctive shape symbol, shown in part (a), 

FIGURE 1 Standard logic symbols for the AND gate showing two inputs (ANSI/IEEE
Std. 91-1984/Std. 91a-1991).


Operation of an AND Gate

An AND gate produces a HIGH output only when all of the inputs are HIGH. When any of the inputs is LOW, the output is LOW. Therefore, the basic purpose of an AND gate is to determine when certain conditions are simultaneously true, as indicated by HIGH levels on all of its inputs, and to produce a HIGH on its output to indicate that all these conditions are true. The inputs of the 2-input AND gate in Figure 1 are labeled A and B, and the output is labeled X. The gate operation can be stated as follows:

For a 2-input AND gate, output X is HIGH only when inputs A and B are HIGH; X is LOW when either A or B is LOW, or when both A and B are LOW.

Figure 2 illustrates a 2-input AND gate with all four possibilities of input combinations and the resulting output for each.

FIGURE 2 All possible logic levels for a 2-input AND gate. Open file F03-09 to verify
AND gate operation.

AND Gate Truth Table

The logical operation of a gate can be expressed with a truth table that lists all input combinations with the corresponding outputs, as illustrated in Table 3–2  for a 2-input AND gate. The truth table can be expanded to any number of inputs. Although the terms HIGH and LOW tend to give a “physical” sense to the input and output states, the truth table is shown with 1s and 0s; a HIGH is equivalent to a 1 and a LOW is equivalent to a 0 in positive logic. For any AND gate, regardless of the number of inputs, the output is HIGH only when all inputs are HIGH. 


The total number of possible combinations of binary inputs to a gate is determined by the following formula:


 where N is the number of possible input combinations and n is the number of input variables. To illustrate,

For two input variables: N = 22 = 4 combinations

For three input variables: N = 23 = 8 combinations

For four input variables: N = 24 = 16 combinations

You can determine the number of input bit combinations for gates with any number of inputs by using N = 2n

EXAMPLE 1:

(a) Develop the truth table for a 3-input AND gate.
(b) Determine the total number of possible input combinations for a 4-input AND gate.
Solution:
(a) There are eight possible input combinations (
23 = 8) for a 3-input AND gate. The input side of the truth table shows all eight combinations of three bits.


The output side is all 0s except when all three input bits are 1s.
(b) N = 
24 = 16. There are 16 possible combinations of input bits for a 4-input AND gate.

AND Gate Operation with Waveform Inputs

In most applications, the inputs to a gate are not stationary levels but are voltage waveforms that change frequently between HIGH and LOW logic levels. Now let’s look at the operation of AND gates with pulse waveform inputs, keeping in mind that an AND gate obeys the truth table operation regardless of whether its inputs are constant levels or levels that change back and forth. Let’s examine the waveform operation of an AND gate by looking at the inputs with respect to each other in order to determine the output level at any given time. In Figure 3, inputs A and B are both HIGH (1) during the time interval, t1 , making output X HIGH (1) during this interval. During time interval t2 , input A is LOW (0) and input B is HIGH (1), so the output is LOW (0). During time interval t3 , both inputs are HIGH (1) again, and therefore the output is HIGH (1). During time interval t4 , input A is HIGH (1) and input B is LOW (0), resulting in a LOW (0) output. Finally, during time interval t5 , input A is LOW (0), input B is LOW (0), and the output is therefore LOW (0). As you know, a diagram of input and output waveforms showing time relationships is called a timing diagram.

FIGURE 3 Example of AND gate operation with a timing diagram showing input and output relationships.

EXAMPLE 2:

If two waveforms, A and B, are applied to the AND gate inputs as in Figure , what is the resulting output waveform?


Solution:
The output waveform X is HIGH only when both A and B waveforms are HIGH as shown in the timing diagram:

EXAMPLE 3:

For the 3-input AND gate in Figure , determine the output waveform in relation to the inputs.

Solution:
The output waveform X of the 3-input AND gate is HIGH only when all three input waveforms A, B, and C are HIGH.

Logic Expressions for an AND Gate

The logical AND function of two variables is represented mathematically either by placing a dot between the two variables, as A . B, or by simply writing the adjacent letters without the dot, as AB. We will normally use the latter notation.
Boolean multiplication follows the same basic rules governing binary multiplication, and are as follows:
The operation of a 2-input AND gate can be expressed in equation form as follows: If one input variable is A, if the other input variable is B, and if the output variable is X, then the Boolean expression is
X = AB
Figure 4(a) shows the AND gate logic symbol with two input variables and the output variable indicated.
FIGURE 4 Boolean expressions for AND gates with two, three, and four inputs.