an encoder device of the absolute position type for outputting a shift position or angle of rotation relative to the absolute position . the device comprises a code plate having first and second grid patterns wherein information is stored as 1 or 0 in a periodic manner at pitches slightly different from each other ; first and second sensory arrays for detecting the first and second grid patterns ; driving means for driving the sensors relative to the grid patterns and for obtaining an alternating signal from each array ; and computation means for measuring the phase angle of the alternating signal from each array , and the phase angle difference therebetween and for calculating the position using such phase angles . advantageously , the invention is suitable for miniaturization due to its simplicity , relaibility , and efficiency .