Building an AND-gate (logic flow/logic gate)

 In this post we see how to build a logic AND gate.

It's actually really simple to understand.

Say you have a car door and a car ignition. On the car door you have a magnetic switch that lets a wire spring back to closed mode when the door is open. Ignition has electricity through it when the engine is on. SO you have live current in both scenarios, right? Call that state 1 and 1

Now consider a state where either the ignition is off AND the door is open, OR the door is closed AND the ignition is off.

Call that state 0 and 1 or 1 and 0 (1=open/on, 0 = closed/off).

Now suppose you want the interior head light in the car to turn on when the door is open and the ignition is on.

You put a lightbulb on a wire. Then leading to that set of wiring you have this thing I made = an "and gate". You have electricity from the door and engine going there.

The and gate does this:

engine on , door open = 1 and 1 = true. Electricity must go to the light above your head.

engine off, door open = 1 and 0 = false. No light.

engine on, door closed = 0 and 1 = false. No light.

engine off, door closed = 0 and 0 = false. No light.

So this is the truth table:

1 & 0 = 0

0 & 1 = 0

0 & 0 = 0

1 & 1 = 1

That's how your car decides how to turn on the light above your head.

This also corresponds directly to English. "If my car door is open AND the engine is running, turn on the overhead light, otherwise do not."

Here's an article which explains better than I did. 


Here's the actual circuit and a video. In the diagram below, ko means kilo-Ohms.







Popular posts from this blog

Spotting a phishing (hacker) email

Building an OR gate