The LLR algorithm is a recent proposal for computing the density of states in lattice gauge theory. This algorithm has been tested in several bosonic models at zero and finite chemical potential with impressive results. Its original formulation is based on the simulation of the theory on restricted action intervals using local Monte Carlo updates. We will discuss a new version of the method based on the global Hybrid Monte Carlo algorithm that is suitable for theories with dynamical fermions. We shall present our preliminary result for the study of the SU(2) gauge theory.