Nanoscale transistors function similarly to their larger counterparts by controlling the flow of electrical current through a semiconductor material. They have three main parts: the source, drain, and gate. By applying a voltage to the gate, one can control the current flowing from the source to the drain, effectively switching the transistor on or off.