Electron spins can be oriented in different directions, typically referred to as "up" or "down" states. By manipulating these states, it is possible to encode information in a binary format, similar to the 0s and 1s in classical computing. Techniques such as magnetic resonance and external magnetic fields are used to control spin states at the nanoscale.