# Why do we even need an OR gate? [duplicate]

## Question

This might be a naive question but hear me out, can't we just connect the two wires in parallel to build an OR gate? Like this:

simulate this circuit – Schematic created using CircuitLab

Attach maybe a resistor at the end to have a consistent value if needed.

• You are shorting input 1 and 2 as well as the output. What will happen if you set input1 = HIGH and input2 = LOW? Will there be a contradiction?
– Carl
Sep 23, 2022 at 16:29
• Depends what's driving Input 1 and Input 2. Sometimes this is indeed all you need. Sep 23, 2022 at 16:30
• @Carl Again a naive guess but can I use a diode to not allow back current from one input to the other? Sep 23, 2022 at 16:32
• Wired-OR is common in some places, for example it's practically the defacto standard for controlling the nRESET input on an MCU (inverted logic in that case, for reasons that are not important here). Open collector/open drain outputs are used with a (possibly internal) pull-up. Sep 23, 2022 at 18:06
• A logic zero is not the absence of an output, nor is the it the absence of a logic one. Sep 23, 2022 at 18:52

$$\begin{smallmatrix}\begin{array}{rr|c} I_1 & I_2 & O\\ \hline 0 & 0 & 0\\ 0 & 1 & 1\\ 1 & 0 & 1\\ 1 & 1 & 1 \end{array}\end{smallmatrix}$$
In your diagram, you have shorted $$\I_1\$$ and $$\I_2\$$. This means that $$\I_1\$$ and $$\I_2\$$ will be at the same potential. But what if you force $$\I_1\$$ to be HIGH and $$\I_2\$$ to be LOW? You are forcing them to be at a different potential, but they have to be at the same potential... so we have a contradiction.
Even if we look past this, which input will dictate the output? If $$\I_1\$$ is HIGH and $$\I_2\$$ is LOW how can you possibly conclude what the output will be? You cannot combine multiple signals into a single node.