A comprehensive neutron scattering study has been performed of hydrogenated (Si0.78H0.22), deuterated (Si0.77D0.23) and partially fluorinated deuterated (Si0.725D0.120F0.155) amorphous silicon, prepared by the glow-discharge technique. The measurements performed include diffraction, small-angle neutron scattering (SANS) and inelastic neutron scattering, and the data obtained are discussed in terms of various structural models in the literature. The real-space correlation function for Si0.77D0.23 exhibits sharp peaks at 1.49 and 2.36 angstrom , due to Si-D and Si-Si covalent bonds, respectively, while peaks centred at 3.2 and 3.8 angstrom are due to Si-D and Si-Si second-neighbour distances. High-energy resolution inelastic scattering measurements for Si0.78H0.22 show that there are approximately equal numbers of equivalent to SiH and = SiH2 groupings, there being no indication of excitations corresponding to -SiH3 groupings. The presence of molecular hydrogen is demonstrated unambiguously by the observation of the ortho-to-para conversion, via molecular rotation modes at 14.5 and 29.4 meV. The shift in the Si-H stretch modes introduced by deuteration is slightly less than the value of root 2 expected for free hydrogen, indicating a small but observable influence of the amorphous silicon matrix. The size of the cages containing the H-2 molecules has been investigated via SANS, which yields a mean Guinier radius of similar to 5-6 angstrom. In addition, the use of the H-D SANS contrast technique indicates that each cage contains on average about 60 H-2 (D-2) molecules. The data for the Si0.725D0.120F0.155 sample are consistent with a previously suggested model of network cages predominantly containing molecular SiF4.