A large variety of nanometre-scale devices have been investigated in recent years that could overcome the physical and economic limitations of current semiconductor devices. To be of technological interest, the energy consumption and fabrication cost of these 'nanodevices' need to be low. Here we report a new type of nanodevice, a quantized conductance atomic switch (QCAS), which satisfies these requirements. The QCAS works by controlling the formation and annihilation of an atomic bridge at the crossing point between two electrodes. The wires are spaced approximately 1 nm apart, and one of the two is a solid electrolyte wire from which the atomic bridges are formed. We demonstrate that such a QCAS can switch between 'on' and 'off' states at room temperature and in air at a frequency of 1 MHz and at a small operating voltage (600 mV). Basic logic circuits are also easily fabricated by crossing solid electrolyte wires with metal electrodes.