Based on the bi-stable characteristic of quantum-dot cellular automata (QCA), the encoder and decoder are designed according to different principles. Simulation is performed using semiclassical simulation method. Compared with the existing designs of