Defect-tolerant demultiplexers for nano-electronics constructed from error-correcting codes