When a transistor is on, or open, then an electric current can flow through. And when it's off, then no current flows. When you string a bunch of these transistors together, then you get what's called a logic gate, which lets you add, subtract, multiply, and divide binary numbers in any way imaginable.