This study is concerned with encoding types such as value encoding and binary encoding for continuous and discrete optimization with a GA, which is coded in FORTRAN and considers stress and displacement constraints, in view of weight minimization of truss structures. Moreover, when continuous optimization is performed, the challenge of huge search space due to the effort of considering continuous set of design variables is overcame by a mechanism introduced as restricted range approach (RRA) in this study. In comparison with the literature, it is concluded that the program developed in this study can be effectively used in the weight minimization of truss structures. It is also came to the conclusion that value encoding overcomes the adverse effects of Hamming-cliff, and that value encoding requires less computer memory and time, never destroys the fit chromosome. (C) 2010 Elsevier B.V. All rights reserved.