Transistors can create logic gates and store data. When a current is passed through a transistor, it is on. When it is not, the transistor is off.