Warren Buffett at the annual shareholders meeting of his Berkshire Hathaway investment group this year. Photograph: Rick Wilking/Reuters

The billionaire investor Warren Buffett has ended his moratorium on investing in technology, taking a $12bn (£7.5bn) stake in IBM, the 100-year-old tech firm.

Buffett's Berkshire Hathaway investment firm has been buying shares in IBM since March and now owns 64 million shares, or about 5.4% of the outstanding stock, Buffett said in an interview on Monday on the financial news channel CNBC.

The investor was given permission by securities regulators to keep the purchases secret for several months but having finalised the purchase the firm also revealed that it added smaller stakes in Intel Corp, DirecTV, General Dynamics and CVS Caremark Corp.

Buffett is a close friend of Bill Gates, Microsoft's co-founder, but has famously avoided hi-tech stocks, preferring to invest in household names such as Coca-Cola and American Express, or insurers.

As the technology boom got into full swing in 1998, Buffett told shareholders: "I don't want to play in a game where the other guy has an advantage.

"I could spend all my time thinking about technology for the next year and still not be the 100th, 1,000th or even the 10,000th smartest guy in the country in analysing those businesses. In effect, that's a 7ft or 8ft bar that I can't clear. There are people who can but I can't. The fact that there'll be a lot of money made by somebody doesn't bother me really. There's going to be a lot of money made by somebody in cocoa beans. But I don't know anything about 'em."

But Buffett told CNBC he had been "hit between the eyes" by the advantages the company enjoys in finding and keeping clients. "It's a company that helps IT departments do their job better," he said. "It is a big deal for a big company to change auditors, change law firms", or for IT departments to move away from using IBM, he said. "There is a lot of continuity to it."

Big Blue, as the firm is known, began life as the Computing-Tabulating-Recording Company in 1911, becoming IBM in 1924.

It dominated the computer sector but was near collapse by the end of 1994, thanks in part to its inability to capitalise on the new wave of computing led by Microsoft. In 1990 it had one of its most profitable years. But in 1992 IBM lost $5bn – then more than any US firm had ever lost in a single year.

Under former chief executive Louis Gerstner, IBM pulled off one of the most remarkable turnarounds in corporate history. The company concentrated its business on services, embraced the internet and sold its personal computer business.

IBM's stock has risen about 10% in the last six months, making Berkshire's stake worth about $12bn.

The 81-year-old's stock-picking prowess has earned him the nickname "the Oracle of Omaha" and made him one of the world's three richest men, with a fortune of $50bn, according to Forbes magazine. Buffett also said that Berkshire had increased its holdings in a leading US bank, Wells Fargo, but did not give details.

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.