Researchers have designed an electronic neuron that combines two simple elements, a conventional transistor and a nanoscale magnetic device, to reproduce the behaviors of biological neurons. Unlike conventional electronic neurons, these behaviors emerge naturally from the magnetic properties of the device, without requiring complex control circuitry. The circuit can generate precisely timed electrical pulses that resemble those of biological neurons and, in a small demonstration, perform machine learning.