# Lesson : Logic Gate (OR)

In the previous lesson, we learned about the logic gate “AND”. The “AND” logical operation produces a “High” output if all of its input are “1s”. If one or multiples of its inputs are “0s”, the output of the “AND” logic gate will be a zero. In this lesson, we are going to see our second logic gate called the “OR” Gate. The “OR” gate do the logical operation “OR” and is often represents with “|” or “||”. The “OR” logical operation produces a “Low” output if all of its input are “0s”. If one or multiples of its inputs are “1s”, the output of the “OR” logic gate will be a “1”. The “OR” Gate is represent below :

Below, you can find the four possible inputs combination with its output result :

Truth table

A truth table is often used to describe how a logic gate behave with given inputs. For the “OR” logic gate with 2 inputs, we have the following truth table : $\begin{array}{c c|c} A & B & Output\\ \hline 0 & 0 & 0 \\ 0 & 1 & 1 \\ 1&0&1 \\ 1 & 1 & 1\end{array}$

On the left side of the truth table, you have the inputs “A” and “B” with all 4 possibles combination of “0s” and “1s”. First line is “A” equals “0” and “B” equals “0” which result in an output of “0”. The second line is “A” equals “0” and “B” equals “1” which result in an output of “1”. The fourth and last line of the truth table is “A” equals “1” and “B” equals “1” which result in an output of “1” for the “OR” logic gate.

3 or more inputs “OR” gate

We could have more than two inputs with an “OR” gate but there will always be only one output. The 3 or more inputs “OR” gate follows the same rule as the 2 inputs “OR” gate. The “OR” logical operation produces a “Low” output if all of its input are “0s”. If one or multiples of its inputs are “1s”, the output of the “OR” logic gate will be a “1”. Below, you can find the schematic symbol for a 3 inputs “OR” gate and its truth table : $\begin{array}{c c c|c} A & B & C & Output\\ \hline 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 1 & 0 &1 \\0 & 1 & 1 & 1 \\1 & 0 & 0 & 1 \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 &1 \\1 & 1 & 1 & 1\end{array}$