An analytical technique for generating good binary pulse compression codes is developed. The first step in constructing a code of a given lengthNis to divide all the residues moduloNand less thanNinto residue classes. A code digita(i)=pm 1is assigned to all members,i, of certain of these classes anda(i)=-1toNand all members,i, of the remaining classes. Many of these divisions resulted in difference sets and corresponding binary codes with single-level periodic code correlations. Other divisions resulted in two-level periodic code correlations. In order for a binary pulse compression code to have low autocorrelation sidelobes, its periodic correlation sidelobes must be low. Therefore, codes with low periodic correlations were sought. Good binary codes for lengths just above100digits down to lengths near10digits were found. Several of them are known to be optimum codes. When programmed on an IBM7094, this analytical technique produced codes for lengths near100digits as good as, or better than, any previously known binary pulse compression codes in less than15minutes computer time.