Scientists have finally decoded the bizarre behaviors of brain cells — and recreated them in tiny computer chips.

The tiny neurons could change the way we build medical devices because they replicate healthy biological activity but require only a billionth of the energy needed by microprocessors, according to a University of Bath press release.

Neurons behave similar to electrical circuits within the body, but their behavior is less predictable — especially when it comes to parsing the relationship between their input and output electrical impulses. But these new artificial brain cells successfully mimic the behavior of rat neurons from two specific regions of the brain, according to research published Tuesday in Nature Communications.

“Until now neurons have been like black boxes, but we have managed to open the black box and peer inside,” University of Bath physicist Alain Nogaret said in the release. “Our work is paradigm changing because it provides a robust method to reproduce the electrical properties of real neurons in minute detail.”

The ultimate goal is to use these neurons to build medical devices that can better cater to patients’ needs, like a smarter pacemaker that can respond to new stressors and demands on a person’s heart — essentially upgrading devices to be more in tune with the body.

Julian Paton, a physiologist at the universities of Auckland and Bristol, said in the release that recreating biological activity was exciting because it “opens up enormous opportunities for smarter medical devices that drive towards personalized medicine approaches to a range of diseases and disabilities.”