d 2 at a reference position generation circuit 45 as is similar to the former embodiment based on the absolute position signal d 1 the relative position signal d 2 and the reference position signal d 3 an absolute position composition circuit 29 calculates minute absolute positions of the scale 12 referring to fig1 operations of the absolute position composition circuit 29 will be described below the absolute position signal d 1 has information for absolute positions of the scale 12 since the absolute patterns 32 are formed with a predetermined accuracy with respect to the reference position signal d 3 it is possible to determine which one of periods pr the scale 12 is located in for the reference position signal d 3 by obtaining absolute positions from the absolute position signal d 1 1 of fig1 after the one of the periods pr is determined for the reference position signal d 3 a value of the reference position signal d 3 is detected then it is possible to determine which period the scale 12 is located in for the first incremental patterns 31 2 of fig1 thereafter absolute positions of the scale 12 may be calculated and output by counting light and dark regions of the relative position signal.