How a tiny magnetic switch becomes a random-bit source

A magnetic tunnel junction is a stack of two magnetic layers separated by an extremely thin insulating barrier. Electrons can cross that barrier by quantum tunneling, and the junction’s electrical resistance depends on how the layers’ magnetizations are aligned.

In a device designed for randomness, tiny, unpredictable changes in electron spins can make a magnetic layer switch between states. Those switches alter the junction’s resistance. A circuit monitors the resulting electrical signal and translates its changing values into 0s and 1s.

From physical fluctuations to usable bits

The useful feature is not merely that the signal fluctuates, but that the timing and outcome of the microscopic changes cannot be reliably predicted in advance. That makes the junction a physical source of entropy—the unpredictability needed for secure cryptographic keys and other random-number tasks.

The raw signal still needs careful handling. Real devices can produce more of one output than another, or include ordinary electrical noise. A generator can process the measurements to reduce bias before delivering bits. At high speed, many junctions or rapid repeated measurements can turn those microscopic events into billions of bits per second.

Unlike a software generator that expands a starting value through a deterministic calculation, this approach draws on events occurring in the device itself. Its practical promise is to make randomness available at electronic speed, with the uncertainty rooted in changing spins rather than in a computer’s ability to disguise a predictable sequence.