12 Shaft encoder is widely used in order to measure rotation angle in automatic system. Commonly used incremental encoder is low cost and has high resolution compared with an absolute encoder. However, it is susceptible to power line noise and failures. Absolute type encoders are generally used in applications where it is difficult to return to their home positions in system failure. Both type encoders use light sources, coding disk, light detectors and signal processing circuits. In order to obtain absolute rotary position, gray code is usually utilized in the code disk. Therefore, the resolution of an absolute encoder is dependent on the space to engrave the code. In this paper moire fringe is used to increase the resolution in addition to the gray code pattern. Since the fringes move nonlinearly as the code disk rotates, the position related with the rotation angle is obtained by a neural network. A prototype encoder is set up and a series of experiments are conducted.