Magnetic field sensors, each generating an electrical output signal in
proportion to the local magnetic field, are lithographically fabricated
on a semiconductor substrate with a small spatial separation. The lateral
dimension of the sensors and the separation length are the order of the
minimum lithographic feature size. Comparing the electrical signals of
the sensors results in a measurement of the local magnetic field
gradient. Large field gradients, that vary on a small spatial scale, may
be associated small magnetic structures such as microscopic magnetic
particles. Detection of a field gradient can be used to infer the
presence of a magnetic particle.