Nanotube-based switching elements and logic circuits are disclosed. The bit line selecting circuit is disposed in a cell area where the memory cells are formed. As a further measure to prevent contamination, the region behind the compliant seal is pressurized.