Hey diddle diddle. Guess what the cow has done this time?

America’s dairy farmers could soon find themselves in the computer business, with the manure from their cows possibly powering the vast data centers of companies like Google and Microsoft. While not immediately intuitive, the idea plays on two trends: the building of computing centers in more rural locales, and dairy farmers’ efforts to deal with cattle waste by turning it into fuel.

With the right skills, a dairy farmer could rent out land and power to technology companies and recoup an investment in the waste-to-fuel systems within two years, Hewlett-Packard engineers say in a research paper to be made public on Wednesday.

“Information technology and manure have a symbiotic relationship,” said Chandrakant D. Patel, the director of H.P.’s sustainable information technology laboratory, which wrote the report. “And having these data centers locally will give farmers a new opportunity.”

Companies have historically tended to build their large computing centers — often called server farms — in or near large cities and industries. As this practice has continued over the years, it has become difficult for companies building the largest data centers to find enough cheap electricity and real estate to meet their needs.