An OR gate is a digital electronic logic gate. A logic gate is an electronic component that results in a single binary output after implementing its logic on the input signals. A logic gate follows certain logical relations between the inputs and the outputs. The inputs and the output only contain two values that are either ‘1’ or ‘0’, ‘high’ or ‘low’, ON’ or ‘OFF’, ‘true’ or ‘false’, ‘closed’ or ‘open’, ON’ or ‘OFF’ etc.
OR gate is a digital electronic logical gate that takes input and performs addition on them. The output is the addition of inputs. If one or both the inputs are set to high or ‘1’, then the OR gate will give a high output, that is ‘1’, and when neither of the inputs is high or ‘1’, the OR gate will give a low output.
2-Input OR GATE
Boolean expression:
In Boolean Algebra, a plus sign ‘+’ represents OR function.
The boolean expression for a two-input OR is given as
Z=A+B
The above expression is read as Z and equals to A OR B, where A and B are the inputs and Z is the output.
Logic symbol:
There are two input values in the two-input OR gate and only one output value. There are a total of four input combinations. The logic design is given as
Truth-Table:
A truth table is a table that shows all the combinations of input and their corresponding outputs. Only binary digits are used in the truth table. The OR logic is that the output Y will be true when either one or both inputs are set high or false.
A | B | Z |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
3-Input OR GATE
Boolean expression:
The boolean expression for a three-input OR is given as
Z=A+B+C
The above expression is read as Z is equal to A OR B OR C where A, B, and C are the inputs and Z is the output.
Logic symbol:
There are three input values in the three-input OR gate and only one output value. There are a total of eight input combinations. The logic design is given as
Truth-Table:
The truth table of the OR gate with the three inputs is given as
A | B | C | Z |
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 |
In the above table, there are eight combinations of three inputs. The output is false for the first combination only when all the three inputs are zero as it does not satisfy the OR logic. All the other seven combinations of the inputs give an accurate output as it satisfies the OR logic.
Implementation of OR Gate
Using diodes:
The logic gates can be implemented by diodes. A diode is an electronic component. It has two ends. The current flows through the diode in one direction only.
The OR gate can be implemented by using two diodes and a resistor.
When the diode inputs are at the low stage or 0 voltage, the diodes become reverse biassed, and the output will be low. Hence no current flows through it. It then acts as an open switch.
When any one of the inputs is at a high stage, the diodes become biassed with that particular end. The output will be high and current flows through it. It then acts as a closed switch.
Using NOR Gate:
NOR gate is the inversion of the logical OR gate. Its shape is the same as the OR gate with a circle at the output part, also called an ‘inversion bubble’. The boolean expression of the NOR Gate is Y = ( A + B)’
The symbol of the NOR gate is-
Logic OR can be implemented by two NOR gates. To implement OR logic, give inputs A and B to gate 1 and then redirect the output of gate 1 to both the inputs of gate 2. The output of the OR gate 2 will be the same as the output of an OR logic that is Y = A + B.
Conclusion
OR gate is mostly used as a logic gate. It can accept two or more than two inputs but gives only one output. Logical OR operation can be performed by both universal gates (NAND and NOR) as well as diodes. The two commonly used ICs for OR gates are complementary metal-oxide-semiconductor (CMOS) and transistor-transistor logic (TTL). The application of OR gates is in intrusion detection and an alarm system. These systems can be used in homes, offices, etc.