It’s a fairly trivial task to use small signal diodes to form digital logic gates. Diodes are cheap and it can be very cost effective to use them in place of dual-in-line integrated circuits.
or-gate.

The output of the gate is connected via a tie-down resistor R1 to ground. This ensures that when no input signal is applied to input A or input B the output of the gate X remains low.
When either of the inputs become high the diode will conduct and a current will flow through the resistor to ground. There will be a voltage drop across the diode of approx 0.7V when it’s conducting so the voltage at point X will be Vin-0.7 so for a 5V input the output will be at 4.3volts which is sufficient to be defined as as a ‘high’ in logic terms.
The ‘gate’ in extensible so all you need to do is to add additional diodes to create more inputs.
and-gate.
The and gate is a simple modification of the or-gate logic. by connecting the resistor to a positive supply voltage and reverse biasing the diodes the circuit will now work as and and-gate

When both inputs are low points A and B are virtual grounds and the supply voltage is dropped across the resistor so point X is at zero.
Consider when A is high and B is low. D1 is now reversed biased no no current will flow through it, but it will flow through D2 and point X is at zero. The same argument holds when B is now high and A is low.
Now when A and B are both high both diodes are reversed biased and no current will flow through the circuit so the supply voltage will appear at output point X and the output of the circuit is high.





