The authors propose a method to separate the truncation error and the round-off error from the numerical solution. The analytical truncation error formulas of a partial differential equation are given for the upstream scheme and the centered difference scheme, respectively. The reference solution method is then introduced to separate these two types of errors for more general equations. A scheme based on the reference solution is used to obtain the approximate truncation error. Comparing the results for the upstream scheme and the centered difference scheme, the authors find that：1) the approximate truncation error is highly consistent with the analytical one. 2) The truncation errors of 1-D wave equations for the two schemes both show wavy periodicities with amplitudes being related to the parameters of computation. 3) The analytical error is suitable for the analysis of any slice of t, while the approximate one is only suitable for the analysis of a certain time range. However, the approximate error can be more easily obtained for general differential equations without a complex theoretical deduction.