← Circuit Toolkit

Logic Gates Visual Lab

See every logic gate light up, then watch how combinational circuits react instantly while sequential circuits remember.

Want to build your own circuit? Open the Logic Gate Simulator →

AND gate — Output is 1 only when ALL inputs are 1.

Boolean expressionthe gate’s rule written as a tiny maths sentence
Y=A⋅BY = A \cdot B

Read it as: “Y equals A AND B”

Right now, with your switches:

Y=0⋅0=0Y = 0 \cdot 0 = 0

A Boolean expression uses letters (A, B) that can only be 0 or 1, joined by logic operators. Put in the input values, work it out, and you get the output Y — exactly what the gate does.

A⋅BA \cdot B
AND
dot — like multiplying
A+BA + B
OR
plus — but 1 + 1 = 1
A‾\overline{A}
NOT
bar over the top flips it
A⊕BA \oplus B
XOR
circled plus — different?

Tap the switches

Swipe sideways to see the whole circuit →

AND0Y0A0B
Output Y = 0

Truth table — tap a row

ABY
000
010
100
111

Think of it as…

AB+

Two switches in series: the lamp lights only when A AND B are both closed.

Where is Y = 1?

AB

Shaded areas are the input cases that give 1. The white dot is where you are now.

Where it's used: Enable signals — a motor runs only when the guard is shut AND start is pressed.

Frequently asked questions

What is a Boolean expression?

It is a logic circuit's rule written as a short algebra sentence. The letters (A, B) can only be 0 or 1, and they are joined by logic operators: a dot for AND, a plus for OR, a bar over the top for NOT and a circled plus for XOR. Put the input values in, work it out, and you get the output.

What is the difference between a combinational and a sequential circuit?

A combinational circuit's outputs depend only on its inputs right now: it has no memory, no feedback loop and no clock, so the same inputs always give the same outputs. A sequential circuit also depends on what it has stored, so the same inputs can give a different output depending on what happened before.

What gives a latch or flip-flop its memory?

Feedback. In an SR latch the output of each NOR gate is wired back into the other gate, so once S or R has set the output, the two gates hold each other in that state even after both inputs return to 0.

What is the difference between a latch and a flip-flop?

A latch is level-triggered: a D latch passes D straight through to Q the whole time its enable input is 1. A flip-flop is edge-triggered: a D flip-flop copies D to Q only at the instant the clock rises, and ignores D the rest of the time.

Why does a next-state equation have Q on both sides?

Q+ on the left is the next value of the output, and Q on the right is the value stored now. For an SR latch, Q+ = S + R-bar times Q: with S and R both 0 the next value is simply the current one, which is exactly what memory means.

What is the difference between XOR and OR?

OR is 1 when at least one input is 1, including when both are. XOR is 1 only when the inputs are different, so it is 0 when both are 1. That is why XOR gives the sum bit of a half adder.

Related tools

Browse the full circuit toolkit or start a guided lesson in topics.

Share