In gradient based optimization methods, the finite differencing which uses small perturbations in the design variables has been used to calculate the sensitivity. Recently, the automatic differentiation has been widely studied to calculate the function value and the sensitivities simultaneously. In this paper, the applicability of the automatic differentiation In the aerodynamic design optimization is studied. ADIFOR and TAPENADE are used to generate the codes which give the function value and the sensitivities for 2D compressible inviscid flows.