# Logic gate without transistor

I wonder how to make logic gates without transistors, logic-integrated circuits, or diodes. The components that I need are: two terminal push switches, a resistor, a 3v battery, led.

• Is this a homework question? There are any number of "intro to digital logic" guides that use switch logic as an example.
– vir
Jul 6, 2023 at 22:52
• No. I was fiddling around with a breadboard and was wondering if it is possible to make logic gates without using transistors. Jul 6, 2023 at 23:00
• Two or more switches in series performs "AND" function, two or more switches in parallel performs "OR" function. Unfortunately, there's no way to do "NOT" directly, so it isn't a "universal" system of logic. Jul 6, 2023 at 23:28
• You can use relays and other electromechanicals and have a 5 horsepower computer: en.m.wikipedia.org/wiki/Harvard_Mark_I Jul 6, 2023 at 23:37
• @DaveTweed what about a NC switch? Jul 7, 2023 at 1:25

Put the resistor in series with the LED. Put two switches in series and you will get an AND gate:

simulate this circuit – Schematic created using CircuitLab

Put them in parallel to get an OR gate:

simulate this circuit

Put one switch like in the circuit drawn below for a NOT gate:

simulate this circuit

• Yes, but the "NOT gate" is not in a form that can be combined easily with the "AND" and "OR" configurations to create arbitrarily complex logic. Jul 7, 2023 at 0:27
• @DaveTweed Dude asks about making a logic gate (singular) without transistors and diodes, not about creating "arbitrarily complex logic".
– user344209
Jul 7, 2023 at 0:55
• Is it possible to make a xor gate using and,or,not gates? Jul 7, 2023 at 20:07