AND gate

The gate that fires only when all its inputs are on. A plain-English guide to logic gates from TorchAnvil.

An AND gate has two (or more) inputs and one output. The output is high only when every input is high. Flip one input off, and the output drops to zero — regardless of what the others are doing.

How to read it

Think of AND as the word "and" in English. "It's warm and sunny" is only true when both things are true. Same for the gate.

A B A · B
0 0 0
0 1 0
1 0 0
1 1 1

Notice the shape of that column: a single 1 at the very bottom. Three of the four rows are off. AND is a fussy gate — it says no far more often than it says yes, and that fussiness is exactly what makes it useful.

The dot in A · B is deliberate. Boolean algebra borrows multiplication notation for AND because it behaves like multiplication on the numbers 0 and 1: 1 · 1 = 1, and anything times zero is zero. If you ever forget what an AND does, multiply the inputs together.

Why it matters

AND is the gate you reach for when you want a conjunction — a signal that fires only when a specific combination of conditions is satisfied:

Every adder, every multiplexer, every instruction decoder leans on AND somewhere.

A worked example: the carry bit

Here's AND doing real arithmetic. When you add two single bits, you get two results: the sum, and whether the addition overflowed into the next column. That overflow is the carry.

Work through the four cases by hand:

A B A + B in binary Carry
0 0 00 0
0 1 01 0
1 0 01 0
1 1 10 1

Only 1 + 1 overflows, because only 1 + 1 reaches two. Compare that carry column with the AND truth table above — they are identical. The carry out of a single-bit addition is A · B.

That's not a coincidence or a trick. It's why a half adder is exactly one XOR (for the sum) and one AND (for the carry), and why understanding AND gets you halfway to understanding every adder ever built.

How it differs from OR

These two get mixed up constantly, and the confusion always lives in the same row: both inputs on.

A B AND OR
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 1

Three rows out of four differ. AND needs everything; OR is satisfied by anything. If you find yourself saying "it should turn on when either one is pressed," you want OR — reaching for AND there gives you a circuit that stubbornly does nothing until both are held down at once.

A useful sanity check: count the 1s in the output column. AND has exactly one. OR has three. If your gate is firing more often than you expected, you probably reached for the wrong one.

In redstone

In Minecraft redstone, the classic AND is two inputs feeding a pair of torches (each acting as a NOT), then another torch combining them. The gate is "on" only when both inputs are on.

The reason it takes three torches rather than one is that redstone gives you inversion for free and conjunction only indirectly. A redstone torch turns off when the block it's on is powered — that's a NOT. To build AND you invert both inputs, OR them together on a single dust line, then invert the result. That's NOT(NOT A OR NOT B), which De Morgan's law tells us equals A AND B.

Two ticks of delay come along for the ride: one per torch stage. In a fast clocked circuit that delay matters, and it's why compact AND designs are a perennial obsession on redstone servers.

Building it from other gates

AND isn't primitive — you can make it out of NANDs alone:

That's two NAND gates. It seems like a step backwards until you remember that real chips are built from one repeated part, and NAND is that part. The same works with NORs, via De Morgan:

Try wiring both versions in the simulator and checking them against the truth table above. They behave identically — the difference is gate count and delay, not logic.

Gotchas

Try it

The demo on the right is the simplest AND: two levers, one AND gate, one lamp. Flip both levers on to light the lamp. Flip either one off to turn it back off.

Then try the harder version: wire a second AND so the lamp needs three levers. Predict the truth table before you test it — eight rows now, with a single 1 at the bottom.

Frequently asked questions

What is an AND gate?
An AND gate is a logic gate whose output is high only when every input is high. With two inputs there are four possible combinations, and just one of them — both inputs on — produces an output of 1.
What is the difference between an AND gate and an OR gate?
An AND gate needs every input to be on; an OR gate needs only one. They differ on three of the four rows of the truth table, agreeing only when both inputs are off. AND outputs a single 1; OR outputs three.
How do you build an AND gate in Minecraft redstone?
Invert both inputs with redstone torches, combine them on one dust line, then invert the result with a third torch. That is NOT(NOT A OR NOT B), which De Morgan's law shows is the same as A AND B. It costs two ticks of delay.
Why is AND written with a multiplication dot?
Because on the values 0 and 1 it behaves exactly like multiplication. 1 · 1 = 1, and anything multiplied by zero is zero. If you forget what an AND does, multiply its inputs together.
Can you make an AND gate out of NAND gates?
Yes, with two. Feed both inputs into a NAND, then feed that output into a second NAND with both its inputs tied together, which inverts it. NAND is functionally complete, so every other gate can be built from it.