A computer with DNA as its information carrier can solve classic logic conundrums, researchers say.
DNA has been used to do simple number crunching before, but a system developed by Israeli scientists can effectively answer yes or no questions.
Strands of DNA are designed to give off a green light corresponding to "yes".
In Nature Nanotechnology, the team also describes a program which bridges the gap between a computer programming language and DNA computing code.
The team, led by Tom Ran and Ehud Shapiro of the Weizmann Institute in Israel, has been developing DNA-based computation systems for a number of years, including "computers" that can diagnose and treat cancers autonomously.
But the current approach is fundamentally different, Professor Shapiro told BBC News.
"Using more sophisticated biochemistry, we were able to implement simple logic programs, which are more akin to the way people program electronic computers," he said.
The system devised by the researchers uses molecules to represent facts and rules. In this way, the team was able to use it to answer simple molecular "questions".
First, they tried the system with simple "if then " propositions. One of these went as follows: "All men are mortal. Socrates is a man. Therefore, Socrates is mortal."
When fed a molecular rule (all men are mortal) and a molecular fact (Socrates is a man), the DNA computing system was able to answer the question "Is Socrates mortal?" correctly.
The team went on to set up more complicated queries involving multiple rules and facts. The DNA devices were able to deduce the correct answers every time.
The answer was encoded in a flash of green light. Some of the DNA strands were equipped with a naturally glowing fluorescent molecule bound to a second molecule which keeps the light covered.
A specialised enzyme, attracted to the part of the molecule representing the correct answer, would then remove this cover to let the light shine.
Professor Shapiro said the fact this system was based on clever biochemistry meant it was no less a computer than the conventional kind.
"Of course when the examples are simple, as in today's logic program, one can pre-compute the answer with pencil and paper. But in principle there is no difference between simple and complex computer programs; they can compute only what they programmed to compute.
"It is important to note that, while bio-molecular computing trails behind electronic computing - in terms of actual computing power, maturity of the technology, and sheer historical progression - at the conceptual level they stand side-by-side, without one being a more 'preferred' embodiment of the ideas of computation," he said.
To save time and effort, the researchers developed a robotic system to set up the DNA-based propositions and queries.
The system can take in facts and rules as a computer file of simple text. The robotic "compiler" can then turn those facts and rules into the DNA starting products of a logical query.
"We had to do many, many experiments to develop, debug, and calibrate the molecular computing system, and without computer robotic support to this process, we would not have finished this in our lifetime," Professor Shapiro said.
While the current work may raise the bar for programmable, molecular computing, Professor Shapiro said: "the ultimate applications are in programmable autonomous computing devices that can operate in a biological environment."
In other words, computers that go to work inside a cell.