Monte Carlo simulation of SU(2) gauge theory with fermions on a four-dimensional lattice