A novel concept for a digital rotary displacement sensor is presented. Broadband light issuing from the encoder input fibre is focused on a 9 bit Gray coded dis. Rays emerging from the disc under Littrow conditions are diffracted back to the input fibre by a grating. The output spectrum is encoded as a function of the disc's angular position. The theoretical prediction of the sensor's performance is developed and compared with experimental results. A prototype with a resolution of 0.7 degrees and a nonoperating range of 360 degrees has been successfully tested.