An important goal of molecular evolution is to reveal the historical processes and mechanisms,by which diverse molecular systems have evolved their present day forms and functions. This,research program requires an integration of computational and mechanistic approaches to,learn about the evolutionary processes that fix mutations in genes, and the genetic and,biophysical mechanisms by which the historical mutations that fixed in evolution cause,molecular functions to diverge. This dissertation describes one such functional synthesis.,I first focused on a classic computational phylogenetic method that infers lineage-specific,adaptation on protein-coding genes: the branch-site test. I show that a newly discovered ,phenomenon in molecular studies of mutation, multinucleotide mutations, causes a very strong,bias towards false inferences of positive selection by the branch-site test; this bias is so,pervasive that it can potentially explain many or even most inferences of positive selection,in human and fruitfly genomes that have been made based on the test. These results call into question thousands ,of previously published inferences of positive selection, and suggest,that the importance of adaptation in shaping genes and genomes could be vastly distorted.,A version of the branch-site test that incorporates MNMs to partially reduce this bias is,developed.,Next, to provide a mechanistic explanation of how historical mutations changed protein,functions, I investigated the evolution of novel DNA-specificity in steroid and related recep-,tors, a gene family composed of two functionally diverged clades of transcription factors: :,1) Steroid Receptors (SRs), which bind as a cooperative dimer to an inverted palindrome of,a 6-bp half-site; and 2) Estrogen Related Receptors, which bind as monomers to an extended,9-bp half-site, containing a 5'-flanking extension of the 6-bp SR half-site. Using a ,combination of ancestral sequence reconstruction with biochemical and cell-based characterizations,of protein function, I show that present-day SRs evolved from an ancestral ERR-like receptor,with a preference for a specific 3-bp flanking sequence in addition to the 6-bp core half-site.,Six mutations in two structural groups occurred on the lineage leading to modern SRs and,were sucient for the loss of preference for the 3-bp flank. This change was offset by increasing affinity, for the 6-bp half-site on the SR lineage, with no changes,to cooperative binding. These findings show that new protein functions can evolve through changes in their ,thermodynamic properties without the radical evolution of novel interfaces. Together, the two,projects aim to provide a complete understanding of molecular evolution - from generating,hypotheses about functional change to establishing causality.,This dissertation includes unpublished material, with the MNM chapter on bioarxiv.