The OR gate is another of the basic gates from which all logic functions are constructed.
An OR gate can have two or more inputs and performs what is known as logical addition.

An OR gate has two or more inputs and one output, as indicated by the standard logic symbols in Figure 1, where OR gates with two inputs are illustrated. An OR gate can have any number of inputs greater than one. Although both distinctive shape and rectangular outline symbols are shown, the distinctive shape OR gate symbol is used in this textbook.

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

Operation of an OR Gate

An OR gate produces a HIGH on the output when any of the inputs is HIGH. The output is LOW only when all of the inputs are LOW. Therefore, an OR gate determines when one or more of its inputs are HIGH and produces a HIGH on its output to indicate this condition. The inputs of the 2-input OR gate in Figure 1 are labeled A and B, and the output is labeled X. The operation of the gate can be stated as follows:

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

The HIGH level is the active or asserted output level for the OR gate. Figure 2 illustrates the operation for a 2-input OR gate for all four possible input combinations.

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

OR Gate Truth Table

The operation of a 2-input OR gate is described in Table 3–5. This truth table can be expanded for any number of inputs; but regardless of the number of inputs, the output is HIGH when one or more of the inputs are HIGH


OR Gate Operation with Waveform Inputs

Now let’s look at the operation of an OR gate with pulse waveform inputs, keeping in mind its logical operation. Again, the important thing in the analysis of gate operation with pulse waveforms is the time relationship of all the waveforms involved. For example, in Figure 3, inputs A and B are both HIGH (1) during time interval t1 , making output X HIGH (1). During time interval t2 , input A is LOW (0), but because input B is HIGH (1), the output is HIGH (1). Both inputs are LOW (0) during time interval t3 , so there is a LOW (0) output during this time. During time interval t4 , the output is HIGH (1) because input A is HIGH (1) 

FIGURE 3 Example of OR gate operation with a timing diagram showing input and output time relationships

EXAMPLE 1
If the two input waveforms, A and B,  are applied to the OR gate, what is the resulting output waveform?

Solution:
The output waveform X of a 2-input OR gate is HIGH when either or both input waveforms are HIGH as shown in the timing diagram. In this case, both input waveforms are never HIGH at the same time.

EXAMPLE 2
For the 3-input OR gate in Figure, determine the output waveform in proper time relation to the inputs.


Solution:
The output is HIGH when one or more of the input waveforms are HIGH as indicated by the output waveform X in the timing diagram.

Logic Expressions for an OR Gate

The logical OR function of two variables is represented mathematically by a + between the two variables, for example, A + B. The plus sign is read as “OR.”
Addition in Boolean algebra involves variables whose values are either binary 1 or binary 0. The basic rules for Boolean addition are as follows:

Boolean addition is the same as the OR function.
Notice that Boolean addition differs from binary addition in the case where two 1s are added. There is no carry in Boolean addition.
The operation of a 2-input OR gate can be expressed 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 = A + B
Figure 4(a) shows the OR gate logic symbol with two input variables and the output variable labeled.

FIGURE 4 Boolean expressions for OR gates with two, three, and four inputs.

To extend the OR expression to more than two input variables, a new letter is used for each additional variable. For instance, the function of a 3-input OR gate can be expressed as X = A + B + C. The expression for a 4-input OR gate can be written as X = A + B + C + D, and so on. Parts (b) and (c) of Figure 3–24 show OR gates with three and four input variables, respectively
OR gate operation can be evaluated by using the Boolean expressions for the output X by substituting all possible combinations of 1 and 0 values for the input variables, as shown in Table 3–6 for a 2-input OR gate. This evaluation shows that the output X of an OR gate is a 1 (HIGH) when any one or more of the inputs are 1 (HIGH). A similar analysis can be extended to OR gates with any number of input variables.