← Back to all simulationsSimulation

Logic Gate Simulator

Flip the inputs, switch between gates, and watch the output respond instantly. This is the same 0-and-1 logic behind the physical binary counter challenge, just built from gates instead of cups.

0
ABOUT
000
010
100
111

The logic behind it

Every decision a computer makes, no matter how complicated, eventually comes down to combinations of gates just like these — each one is just a fixed rule for turning one or two 0s and 1s into a single 0 or 1.

The four rules:

The physical binary counter challenge has you count from 0000 to 1111 by hand, flipping cups. Every one of those flips is really the output of a small chain of gates like these deciding whether a bit should carry over to the next position — the counter is what you get when you wire enough of these together.

Real logic gates are built out of transistors — tiny electronic switches, not the shapes drawn here. This simulator shows the logic each gate performs, not the physical electronics that actually implement it, which is its own deep topic in computer engineering.

More on algorithms as a concept →