Nanosensors operate based on various principles, including optical properties, electrical conductivity, and chemical reactivity. For example, carbon nanotubes can be used to detect specific gases due to changes in their electrical resistance upon interaction with gas molecules. Similarly, quantum dots can be engineered to emit light at specific wavelengths, making them useful for detecting biological markers through fluorescence.