Hewlett-Packard plans a sweeping transformation of its business, announcing on Thursday that it would buy the British software maker Autonomy for up to $11.7 billion and would explore options for its personal computer business, including a spinoff.

Under the terms of the deal, H.P. will pay £25.50 a share, or $42.11, in cash through a tender offer. That is about a 64 percent premium to Autonomy’s Wednesday closing price. Autonomy also has bonds that can convert into shares that are eligible for the tender offer.

Hewlett’s chief executive, Leo Apotheker, has said he wants to focus on higher-margin businesses like software and de-emphasize the personal computer business. Software currently accounts for about 3 percent of its revenue, according to Thomson Reuters data.

The giant of England’s “Silicon Fen” in and around Cambridge, Autonomy makes software that searches and keeps track of corporate and government data. It was founded in 1996 by Mike Lynch, the chief executive, who owns 8 percent of the company.

A deal for Autonomy would be H.P.’s third largest acquisition ever, after Compaq Computer and Electronic Data Systems.

H.P. said that the purchase will complement its existing enterprise offerings and give it valuable intellectual property. The company added that it expects the deal to add to its pro forma earnings per share beginning in the first full year after closing.

Autonomy already trades at a much higher multiple than other software companies on the London Stock Exchange, Capital IQ data show.

For the 12 months ended on June 30, Autonomy had revenue of $969 million, according to Thomson Reuters data.

Shares of Hewlett-Packard, which had been down sharply along with the rest of the technology sector, surged after the report before a circuit breaker paused trading in the shares following reports of the deal. When trading resumed, the shares slipped, ending the day down 6 percent at $29.51.

Hewlett-Packard is being advised by Perella Weinberg Partners, Barclays Capital and the law firms Gibson, Dunn & Crutcher; Freshfields Bruckhaus Derringer; and Drinker Biddle. Its board was advised by Skadden, Arps, Slate, Meagher & Flom.

Barclays Capital is also providing debt financing for the deal.

Advising Autonomy are Qatalyst Partners, which is Frank Quattrone’s investment bank; UBS; Citigroup; Goldman Sachs and JPMorgan Chase. Slaughter & May and Morgan Lewis provided legal advice.