Evolutionary hardware (EHW) is a new focus in recent research work. The new method of design hardware is combined evolution algorithm with programmable logic device. Optimization digital circuit is a main domain of EHW. The algebra way and Karnaugh map way are the traditionary methods, but they will meet trouble with the large scale ones to get optimization structure of circuit. This paper proposes a new method (GEP) to optimize the complex digital circuit and designs a new function fitness. The experiments demonstrate the GEP is not only fast convergence but also optimization large circuit. It conquers the slow convergence even not convergence of the traditionary method. The GEP algorithm is simpler and more efficient than the traditional ones.