A team of Stanford engineers has made a simple computer inside a living cell, where it could detect disease, warn of toxic threats and, where danger lurked, even self-destruct cells gone rogue.

The startling achievement, unveiled in Friday’s issue of the journal Science, takes us to a new frontier — where nature’s instruction manual is being programmed to deliver information long-concealed within our bodies.

“We’re going to be able to put computers inside any living cell you want,” said lead researcher Drew Endy of Stanford’s School of Engineering. “Any place you want a little bit of logic, a little bit of computation, a little bit of memory — we’re going to be able to do that.”

The creation completes 10 years of work and represents the final chapter of Stanford researchers’ quest to build the biological computer. It is the latest step in the new field of synthetic biology where — one gene at a time — engineers strive to design organisms unlike anything made by Mother Nature.

These tiny computers could deliver true-false answers to virtually any biological question that might be posed within a cell. For instance: Is toxic mercury present in plants or animals used for food? Scientists could introduce a detective “sentinel” organism to find out.

The internal computers could communicate by engineering cells to change. The “simplest way is to have the cells change their smell or color,” Endy said.

These cellular computers also can count, providing a useful tool when treating diseases like cancer, where cells divide uncontrollably. Suppose a liver cell carries a computer that records how many times it divides. Once the counter hits 500, for instance, the cell could be programmed to die.

Endy’s work “clearly demonstrates the power of synthetic biology and could revolutionize how we compute in the future,” said UC Berkeley biochemical engineer Jay Keasling, director of the Synthetic Biology Engineering Research Center that helped support the Stanford research.

Conceptually, it’s like electronics, where a transistor controls the flow of electrons along a circuit.

But biology is the basis for what the team calls a “transcriptor,” which controls the flow of an important protein as it travels along a strand of DNA like an electron on a copper wire.

Transcriptors are a biological version of electrical engineers’ “logic gates” — the building blocks of digital circuits that send and receive signals.

Endy, recruited to Stanford from the Massachusetts Institute of Technology, is a builder — a civil engineer who started with boyhood Erector Sets and Legos, later working on bridge repair projects for Amtrak.

Now he’s building with the stuff of life to use it as a technology platform.

“Biology is not just a science of discovery, but also a technology for making things,” he said. “We’re not going to replace the silicon computers. We’re not going to replace your phone or your laptop. But we’re going to get computing working in places where silicon would never work.”

Last year, the team delivered two other core components of their computer. The first was a type of rewritable digital data storage within DNA. Information can be stored inside cells by flipping DNA sequences back and forth between two possible orientations to represent and store a “0” or “1,” which represent one “bit” of computer data.

The other was a mechanism for transmitting genetic data from cell to cell, a biological Internet.

Researchers who learned of the work ahead of publication are already using the gates to reprogram metabolism, according to Endy.

A similar computer is being developed at MIT, where engineer Timothy Lu said he seeks to “open up biological applications that conventional computing simply cannot address.”

These new biological computers will be slow, working on a millihertz frequency, Endy cautioned.

“But they’ll work in places where we don’t have computing now,” he said.

Contact Lisa M. Krieger at 650-492-4098.