Precise positioning system is assuming increasing importance. One of Implementation is an optical rotary encoder system which is composed of a fixed light source, a group of photodetectors, and a coding disc. In fact, position resolution is affected with a permutation of coding on the disc. Unstable dc voltage was found from an analog signal transmitted by photoelectric detectors. Setting up a threshold voltage for digital binarization become difficult in this case.In this paper, the limitations, characteristics and operation mode of coding on the disc operation mode arrangement rules of coding on the disc was observed. After collecting the relevant literature, the mathematical sequence named De Bruijn sequence which matches to the arrangement of the above rules and restrictions was found. The desired requirements are summarized and used to filter out the best solution in all solution sets with the designed algorithm. Finally, the characteristics of new and old solutions are compared and discussed.