Magnetohydrodynamic (MHD) turbulence is an intrinsic part of astrophysical phenomena, which plays a crucial role is the generation of cosmic magnetic fields. The two-scale dynamo concept suggests that the small scale interactions are demanded to drive the large scale magnetic fields of planets, stars and galaxies. Since experimental study of MHD turbulence is almost impossible the numerical simulation is only a way to verify theoretical ideas and phenomenology. The purpose of this work is to demonstrate the possibilities of direct numerical simulation of MHD turbulence using the TARANG code (open source software). We focus on mathematical formulation and the built-in postprocessing functions for analysis of spectral distributions and transfers of energies and helicities in the forced 3D homogeneous isotropic MHD turbulence.