These lecture notes are the contents of a two-term course given by me during the 1970-1971 academic year as Morgan Ward visiting professor at the California Institute of Technology. The students who took the course were mathematics seniors and graduate students. Therefore a thorough knowledge of algebra. (a. o. linear algebra, theory of finite fields, characters of abelian groups) and also probability theory were assumed. After introducing coding...