Scientists have converted a bunch of microbes into what they've dubbed the "world's smallest tape recorder:" By tinkering with the genes of an ordinary laboratory strain of Escherichia coli bacteria, researchers say they've been able to coax the bacteria into not only logging their interactions with the environment but time-stamping these occurrences, as well.

These tiny "tape recorders" — which were detailed in a new study published Nov. 23 in the journal Science — can help underpin a new class of technologies that use bacterial cells to diagnose disease or monitor shifts in the environment, all without disturbing their surroundings.

"Such bacteria, swallowed by a patient, might be able to record the changes they experience through the whole digestive tract, yielding an unprecedented view of previously inaccessible phenomena," senior study author Harris Wang, an assistant professor in the department of systems biology at Columbia University Medical Center, said in a statement.

Get the mach newsletter. This site is protected by recaptcha

World's smallest tape recorder is built from microbes Wang Lab / Columbia University Medical Center

The technology behind the tape recorders is the popular gene-editing tool, CRISPR. The tool, which allows scientists to essentially snip out sequences of DNA and replace it with specific genetic material, was originally discovered in bacteria. CRISPR is part of the immune system of certain bacteria — it can copy snippets of DNA from invading viruses so future generations of bacteria can recognize and rebuff subsequent attacks. [10 Amazing Things Scientists Just Did with CRISPR]

"The [CRISPR] system is a natural biological memory device," Wang said. "From an engineering perspective that's actually quite nice, because it's already a system that has been honed through evolution to be really great at storing information."

The team's microscopic recorder consists of a pair of gene-carrying structures known as plasmids. The first, a "timing" plasmid, marks time by expressing certain DNA molecules, called nucleotides, in the CRISPR region of the bacterium's DNA. The other plasmid is modified to create more copies of itself, but only in response to an external signal. The result is a patchwork of background sequences that record time and signal sequences that are inserted in response to changes in the cell's environment.

If that sounds complicated, think of it like this: The timing plasmid prints an "A" at spaced-out time intervals. If there's no "external signal," the scientists would only see this string of A's. But if the second plasmid is turned on by an external signal, it'll insert its stamp into the string of A's. Based on where in that string the second plasmids' stamp shows up, the scientists can deduce when the external signal took place. Like the stripes of data in a magnetic tape, scientists can analyze this further with the aid of computational tools.

In the new study, the researchers showed that the system can record at least three simultaneous signals for several days. The next step is to narrow the targets.

"Now we're planning to look at various markers that might be altered under changes in natural or disease states, in the gastrointestinal system or elsewhere," Wang said.

Originally published on Live Science.

FOLLOW NBC NEWS MACH ON TWITTER, FACEBOOK, AND INSTAGRAM.