While performing only basic functions at speeds likened to a 1950s computer, the tiny machine was hailed as a breakthrough in the search for an alternative to silicon transistors, which control the electricity flow in computer microchips.
Carbon nanotubes (CNTs) are rolled-up, single-layer sheets of carbon atoms – tens of thousands can fit into the width of a single human hair.
They are pliable and have the highest strength-to-weight ratio of any known material.
Silicon is a good semiconductor but cannot be reduced to such a thin layer.
Scientists believe the structure of CNTs may make them better at carrying currents – thus yielding transistors that are faster, more energy efficient and smaller than silicon – but actually building nanotube chips has proved difficult.
"People have been talking about a new era of carbon nanotube electronics moving beyond silicon," said Stanford engineering professor Subhasish Mitra, who led the research.
"But there have been few demonstrations of complete digital systems using this exciting technology. Here is the proof."
The computer, built in a laboratory at Stanford University's School of Engineering, was just a few square millimetres in size and able to perform basic counting and number-sorting functions using 178 transistors each holding between 10 and 200 nanotubes.
It runs at 1 kilohertz – a processing capacity millions of times weaker than today's computers.
The 178-transistor limit was due to the team using a university chip-making facility rather than an industrial process, meaning the computer could in theory be made much bigger and faster, a statement on the study said, published in the journal Nature.
The machine ran a basic operating system that allowed it to multitask and swap between the two processes, it added.
Though it could take years, the Stanford approach hinted at the possibility of industrial-scale production of CNT semiconductors, Naresh Shanbhag, director of a computer chip design consortium, said in a statement issued by the university.
"These are initial necessary steps in taking carbon nanotubes from the chemistry lab to a real environment," added Supratik Guha, director of physical sciences for software giant IBM's Thomas J Watson Research Centre.
But the transistors will have to become smaller than the current 8 micrometres thick (millionth of a metre) for the technique to be feasible, and the processor quicker, he said.