Numerical analysis of solid and liquid diffusion in microsegregation of binary alloys