A magnetic field sensor has a plurality of magnetic field sensing elements and operates as a motion detector for sensing a rotation or other movement of a target object.