Homologous genes are the genes with same function. Paralogous genes are the genes with different function within the same species. Orthologous genes are the genes having same function in two different specis with common ancestor. Analogous genes are the genes with same function in two completely different species.