Cosmological N-body simulations and their analysis