# Can you use diodes instead of OR gate?

I am building a computer and thought if I could simply use diodes instead of OR gates. Will this work with logic ICs such as the 74LS, 74HC and 75HCT series?

Sorry if this is a stupid question, I am new to electronics.

• Just add a pull-down resistor on the output to ensure the next input doesn't float off. May 29, 2015 at 13:18
• en.wikipedia.org/wiki/Diode%E2%80%93transistor_logic May 29, 2015 at 13:19
• It will not work with 74LS unless the pulldown resistor is really low value- 74LS requires outputs to sink current. 1K for a fan-out of 1 and 400mV noise margin, 100 ohms for a fan-out of 10. May 29, 2015 at 17:43

There is a really cool trick that you can use under specific conditions that allows you to build a 2-input OR gate or AND gate using only 1 diode and 1 resistor.

The conditions are:

1) The circuit is low speed.

2) The load impedance is high, such as a CMOS input.

simulate this circuit – Schematic created using CircuitLab

This can be expanded to as many inputs as needed by adding more diodes.

• Nice! Glad I waited for a better answer. Thanks for lowering my project's cost. :) Aug 12, 2015 at 9:28

Yes, that is called diode logic, but you have to be aware of some constrains. You will need a pull down resistor to give a path to the current.

• It should work even without the negative voltage, with the pulldown resistor going to ground. May 29, 2015 at 13:19
• Will the voltage remain the same? Won't the pull down resistors change the voltage levels making the input incompatible? May 29, 2015 at 13:21
• @Pentium100 If you pull the resistor to ground, it won't any drive current available to drive the next stage. May 29, 2015 at 13:28
• @xXLemonPRogrammerXx Not it won't change the voltage levels. Assuming ideal diodes, with 0V input the output will get clamped to 0V by the diodes, and 6V input will be 6V output, there is no resistor divider. Now in the real world you have to account for voltage drop in the diodes. May 29, 2015 at 13:32
• @davidrojas, fair enough. I only used "diode OR" together with CMOS or TTL chips so I did not need much current to drive the next stage. May 29, 2015 at 13:33

Yes you can. For glue logic on slow events (like power supply sequencing or connecting a pushbutton switch), this kind of logic should not cause problems. But

• If you use a negative supply like in davidrojas's answer, then you would be exciting the esd protection diodes of the downstream chip, which could cause unexpected behavior if there's nowhere to draw the pull-down current from. Also, you might not have a negative supply voltage available.

• To make the speed fast, you need to make the pull-down resistor value small, and that will increase the power consumption whenever the logic is high.

• You lose noise margin in the high state due to the drop through the diodes.

• It's more difficult to guarantee timing specs compared to using a dedicated OR gate chip.

Some alternatives that are often better are:

• Use a dedicated logic gate. One-gate chips only cost a few cents, so that the cost of the pick-and-place assembly might be higher than the actual chip cost.

• Invert the logic and use open-drain outputs in wired-AND configuration.