Optimization of decision-tree is a significant branch in decision-tree learning algorithm. An optimized learning algorithm of ID3, a typical decision-tree learning algorithm is presented in this paper. When the algorithm selects a new attribute, not only the information gain of the current attribute, but also the information gain of succeeding attributes of this attribute is taken into consideration. In other words, the information gain of attributes in two levels of the decision tree is used. The computational complexity of the modified ID3 (MID3) is the same as that of the ID3. When the two algorithms are applied to learning logic expressions, the performance of MID3 is better than that of ID3.