Evaluation unit 14 is preferably a microprocessor. Microprocessors have the advantage that the functional elements required by the present invention can be integrated into the microprocessor. With an appropriate program, the functional elements can be electronically addressed, controlled and utilized. Accordingly, the microprocessor includes a memory for storing a program for evaluating the signal value pairs. The memory can be an erasable read/write memory. The microprocessor further includes an analog/digital converter for converting the analog sensor signals 22, 24 of the first and second sensor elements 8, 10. Finally, the microprocessor includes outputs for the switching signals 18. The use of microprocessors permits a compact construction of magnetic sensor 1.