The genetic code is a map which gives the correspondence between codons in DNA and amino acids. As a continuation of the study made by Khrennikov and Kozyrev on the genetic code, we consider a construction, where amino acids are associated to the attractors of some two-adic function. In this paper, we give an explicit form of representations for the standard nuclear and vertebrate mitochondrial genetics codes. To set these functions we use a van der Put representation. The usage of the van der Put series reduces the complexity of computation for explicit form of the functions for the genetic codes.