Combining two inputs

Two levers, one lamp, four possibilities. Time to make decisions. Build an AND gate and meet your first two-input decision rule.

What you'll learn

The idea

Most interesting circuits don't react to a single signal — they react to a combination of signals. Two levers already give you four situations: both off, just A on, just B on, both on. A two-input gate picks one of those four rows and says "output on" — the other three say "output off".

AND is the strictest of those rules: it only says yes when both inputs say yes. It's the circuit version of saying "I'll go if it's sunny AND I'm off work."

The challenge

Place two Levers, label them Input A and Input B. Wire them into the two inputs of an AND gate, then connect the gate's output to a Lamp labeled Output. Try every combination of the two levers and watch the lamp.

Why it matters

Everything later in this course — adders, comparators, registers — is built out of AND, OR, and NOT combined in different patterns. If you can read this truth table and predict the output before you flip the lever, you've got the mental model you need for every lesson after this one.