Keywords: Diffraction grating Absorption enhancement Light trapping Surface texturing Intermediate band solar cellIn this paper, a numerical study is made of simple bi-periodic binary diffraction gratings for solar cell applications. The gratings consist of hexagonal arrays of elliptical towers and wells etched directly into the solar cell substrate. The gratings are applied to two distinct solar cell technologies: a quantum dot intermediate band solar cell (QD-IBSC) and a crystalline silicon solar cell (SSC). In each case, the expected photocurrent increase due to the presence of the grating is calculated assuming AM1.5D illumination. For each technology, the grating period, well/tower depth and well/tower radii are optimised to maximise the photocurrent. The optimum parameters are presented. Results are presented for QD-IBSCs with a range of quantum dot layers and for SSCs with a range of thicknesses. For the QD-IBSC, it is found that the optimised grating leads to an absorption enhancement above that calculated for an ideally Lambertian scatterer for cells with less than 70 quantum dot layers. In a QD-IBSC with 50 quantum dot layers equipped with the optimum grating, the weak intermediate band to conduction band transition absorbs roughly half the photons in the corresponding sub-range of the AM1.5D spectrum. For the SSC, it is found that the optimised grating leads to an absorption enhancement above that calculated for an ideally Lambertian scatterer for cells with thicknesses of 10 um or greater. A 20 um thick SSC equipped with the optimised grating leads to an absorption enhancement above that of a 200 lira thick SSC equipped with a planar back reflector.