The mathematical modeling of phase separation of a binary alloy is formulated by a nonlinear evolution equation, known as Cahn-Hilliard equation with various free energy functions. The Cahn-Hilliard equation generally is a fourth-order nonlinear equation and its analytical solution does not exist except trivial solutions. In this paper, a second--order splitting finite difference scheme, based on 2D Crank--Nicolson method, is investigated to approximate the solution of the 2D Cahn-Hilliard equation with a logarithmic free energy function under Neumann boundary conditions. We have proved that the scheme has a unique solution and we have studied the error estimation for the numerical scheme. Also, we have shown that the proposed method preserves the conservation of mass and the decreasing of the total energy. Finally, three numerical experiments are carried out to test the performance of proposed scheme.