A linear code with a complementary dual (or an LCD code) is defined to be a linear code C whose dual code C⊥ satisfies . The algebraic characterization of LCD codes is given, and it is shown that asymptotically good LCD codes exist. LCD codes are shown to provide an optimum linear coding solution for the two-user binary adder channel. The nearest-neighbor (or maximum-likelihood) decoding problem for LCD codes is shown to reduce to the problem: given a word in C⊥, find the nearest codeword in C.