The ambiguities must be resolved to their correct integer values in order to exploit the high accuracy of the carrier phase double-difference observables. The criterion used by ambiguity resolution technique is the selection of the integer combination that satisfies to the least squares adjustment. Integer ambiguity resolution could be regarded as a kind of global optimization search process. Genetic algorithm (GA) has the advantage to search the global optimum results in the robust and parallel way. Individual encoding is important to improve the efficiency of GA. This paper analyzed two encoding methods, which are binary code and real code, for GPS carrier phase double-difference short baseline ambiguity searching. Then the resolutions of the integer ambiguity using GA with binary and real code were compared. GA with binary code was used to determine the optimum integer estimation after float ambiguity solution resolved. However, due to non-integer nature of baseline vectors values, GA with real code was used to solve baseline vectors and double-difference ambiguity. Real encoding method made up for some deficiencies such as longer code lengthiness, larger solution space and longer time consumed in GA with binary code to non-integer solution. Numerical results showed that GA can be realized to resolve ambiguity resolution of DGPS with whether binary code or real code. The accuracy of both results was basically identical. On the premise of accurate float ambiguity solution, the convergence speed of GA with binary code was faster than that of GA with real code. The resolution of GA with real code was more robust and reliable because it did not depend on the accuracy of initial values.