In this paper, based on the implementation of semiclassical quantum Fourier transform, we first propose the concept of generation vector of ternary binary representation, construct the generation function's truth table, prove that the generation vector of ternary binary representation is one kind of k 's NAF representation and further find that its number of nonzero is not more than [(「logk」+1) /2]. Then we redesign a quantum circuit for Shor's algorithm, whose computation resource is approximately equal to that of Parker (Their requirements of elementary quantum gate are both O (「logN」3), and our circuit requires 2 qubits more than Parker's). However, our circuit is twice as fast as Parker's.