This paper presents a new evolutionary system using genetic algorithm for evolving artificial neural networks (ANNs). The proposed algorithm is "Permutation free Encoding Technique for Evolving Neural Networks"(PETENN) that uses a novel encoding scheme for representing ANNs. Existing genetic algorithms (GAs) for evolving ANNs suffer from the permutation problem, resulting from the recombination operator. Evolutionary Programming (EP) does not use recombination operator entirely. But the proposed encoding scheme avoids permutation problem by applying a sorting technique. PETENN uses two types of recombination operators that ensure automatic addition or deletion of nodes or links during the crossover process. The evolutionary system has been implemented and applied to a number of benchmark problems in machine learning and neural networks. The experimental results show that the system can dynamically evolve ANN architectures, showing competitiveness and, in some cases, superiority in performance.