There are more than a thousand trillion specific synaptic connections in the human brain and over a million new specific connections are formed every second during the early years of life. The assembly of these staggeringly complex neuronal circuits requires specific cell-surface molecular tags to endow each neuron with a unique identity code to discriminate self from non-self. The clustered protocadherin (Pcdh) genes, which encode a tremendous diversity of cell-surface assemblies, are candidates for neuronal identity tags. We describe the adaptive evolution, genomic structure, and regulation of expression of the clustered Pcdhs. We specifically focus on the emerging 3-D architectural and biophysical mechanisms that generate an enormous number of diverse cell-surface Pcdhs as neural codes in the brain.