Reasoning machine is the core of production expert system, and the design of reasoning machine will largely influence the quality of expert system. This paper proposes a new algorithm, which converts knowledge tree into a binary tree, The algorithm will simplify the storage structure and the logical structure of knowledge tree, therefore, it will reduce the pretreatment of the work before the tree of knowledge storage, and prove the feasibility of the algorithm through simulation.