CFD simulations in finite computational domains demand proper boundary treatment due to the absence of flow solutions beyond the boundaries, and accurate boundary residuals are critical to improve the computational stability and convergence rate, especially for implicit time integrations. Among the numerous boundary treatments in previous publications, the characteristic boundary conditions are the particularly successful ones that enjoy both the computational stability and accuracy for general CFD simulations. However, the underlying locally one-dimensional inviscid approximation inevitably causes the numerical drifting of boundary solutions and flow distortions, and the implementation for three-dimensional problems with transverse corrections is cumbersome. Inspired by the success and drawbacks of the characteristic boundary conditions, a set of generalized boundary equations are proposed in this study. It is shown that application of the physical boundary conditions effectively introduces corrections on the residuals that are computed using one-sided schemes, and a novel approach is proposed to determine the correction terms. The resulting boundary equations are in the conservative form, and independent of the time and spatial schemes. Therefore, their implementation in computer software is made more convenient, particularly for multi-dimensional problems on a direction-by-direction basis. The boundary equations preserve the specified boundary conditions accurately if solved exactly. Numerical experiments showed almost negligible deviations from the prescribed boundary values during the explicit integrations without using the relaxation terms that are indispensable for the characteristic boundary conditions.