Professor Ehud Shapiro and researchers at Israel's Weizmann Institute constructed the world's smallest biomolecular computer a few years ago.
Now they have programmed it to analyze biological information to detect and treat prostrate cancer and a form of lung cancer in laboratory experiments.
"We have taken our earlier molecular computer and augmented it with an input and output module. Together the computer can diagnose a disease and in response produce a drug for the disease in a test tube," Shapiro said.
The microscopic computer is so minuscule a trillion could fit in a drop of water. Its input, output and software are made up of DNA molecules –which store and process encoded information about living organisms.
"Our work represents the first actual proof of concept and the first actual demonstration of a possible real-life application for this kind of computer," Shapiro added.
The findings, which are published online by the science journal Nature and were presented at a symposium in Brussels, could transform how diseases like cancer are treated in the future.
Instead of biopsies to remove cancerous tissue, which then must be analyzed in the laboratory, the DNA computer could potentially diagnose the disease within the tissue in the body.
"Our medical computer might one day be administered as a drug, and be distributed throughout the body by the bloodstream to detect disease markers autonomously and independently in every cell," Shapiro said.
It could enable doctors to treat cancer in its earliest stages before tumours have formed and to deliver drugs to hard-to-reach cells if the disease has spread to other parts of the body.
But Shapiro admitted that a DNA computer roaming around the body spotting and treating diseases is still a long way away.
"There are many, many hurdles. It could take decades," he said.