Berkshire Hathaway (BRK.A -0.59%) (BRK.B -0.74%) CEO Warren Buffett has mastered the art and science of value investing. He pays no attention to market trends, but insists on buying top-quality businesses with great leadership teams. Buffett's investing philosophy is steeped in old-school financial analysis and he reads 10-K filings for fun (and profit).

The Oracle of Omaha famously prefers business models so simple that a ham sandwich could run them. He originally aimed that quip at Coca-Cola (KO -0.24%), which sells water-based drinks to a human species that consists of roughly 60% water. It's like selling umbrellas in the rain, hawing ice pops at the beach, or marketing acorns to squirrels. Coke's business runs itself. It would take a lot of extremely poor decisions to mess it up. Coke is a robust cash machine with a generous dividend, currently yielding 3%. Buffett has held 400 million split-adjusted shares of Coca-Cola since 1994, not selling a single stub along the way. That's what a successful investment looks like in Warren Buffett's winning playbook.

Against that ultra-safe backdrop, it might surprise you to hear that Warren Buffett's company also makes plenty of investments in the tech sector -- and some of these high-tech purchases were incredibly farsighted. Here are two tickers from Berkshire's portfolio that might surprise you -- and could set you up for decades of wealth-building returns.

Apple: The elephant in Buffett's wallet

iPhone maker Apple (AAPL -2.19%) is Berkshire's largest holding nowadays, by a long shot. Cupertino's stock accounted for 41% of Berkshire's investments at the end of 2021. At today's prices, these 907.6 million shares are worth $142 billion. The holding was built for an aggregate price of $34.25 per share. We're talking about a return of 357% in seven years -- not too shabby!

And Berkshire keeps increasing its slice of Apple's total shares. The company was Apple's largest shareholder in 2020 with a 5.4% stake, but that ratio rose to 5.6% in 2021. Buffett didn't buy any more Apple shares last year. Instead, his ownership increased thanks to Apple's generous share buybacks.

Apple generated $108 billion of free cash flow over the last four quarters. At the same time, the company spent $83 billion on share buybacks and another $14.8 billion on dividend checks. In other words, Apple sent 91% of its free cash flows right into shareholders' pockets. If you ever wondered what Apple is doing with its enormous cash profits, there's your answer. The cash machine Is tuned to deliver tremendous value to its stockholders.

It's easy to see why a deep-pocketed investor like Warren Buffett loves owning Apple shares. Yeah, the iPhone is a wonder of high technology, but Apple's products also form an addictive ecosystem -- quite similar to Coca-Cola's flavored water. Once you're in, you don't want to leave. Prices may rise, next year's device might not be a whole lot better than the one you already own, and it doesn't really matter. Millions of people don't even think about Android phones, PC computers, or any app store from another company. So the cash keeps flowing in, and Apple supports its rising stock chart with those free-handed buybacks.

Now, the largest stock on today's market probably won't offer the most exciting future returns. It's harder to add impressive percentage-based returns on top of a higher starting point, and Apple's $2.5 trillion market cap is as lofty as it gets. But if you're interested in slower but ultra-predictable gains for the long haul, Apple's and its shareholder-friendly cash management policies should serve you well.

BYD Company: Buffett's early bet on electric vehicles

Elon Musk's Tesla (TSLA -5.59%) didn't invent the electric car. The Tesla Model S was first sold in 2012 but Berkshire Hathaway invested $232 million in BYD Company (BYDDY -1.16%) way back in 2008, right when the China-based company rolled out its first plug-in hybrid vehicles. That's still a long way behind the first mass-market plug-in hybrids from Toyota and Honda, which hit storerooms in 2001, but still a very early investment in a brand-new market.

BYD (short for "Build Your Dream") has delivered stellar returns on Berkshire's investment. The holding is now worth $6.4 billion, delivering a 2,600% return in 14 years.

The road to these gains has been bumpy, mind you. BYD struggled to keep up with the S&P 500 index for more than a decade. The company's portfolio also included traditional cars, consumer electronics, and more, and there wasn't much pop in the business. China is huge but vehicles designed for this market tend to be value-oriented and not-too-profitable.

The stock soared in 2020 as BYD started to extend its reach to Europe. It's easy to see exactly where on this chart the European expansion started:

BYDDY Chart

BYDDY data by YCharts

BYD has also started delivering vehicles to South America and Japan. The company isn't making gasoline-powered cars these days, focusing exclusively on the electric opportunity. And in the first half of 2022, BYD shipped 641,000 EV's. Tesla shifted 564,000 units in the same period. Hence, Buffett's favorite electric vehicle specialist is now the largest name in the market on a global level.

Chinese tech stocks are not every investor's cup of tea, but Buffett's stamp of approval makes a big difference. If it's good enough for the Oracle, you can bet that BYD's papers are in order.

This is not a cheap stock, trading at 138 times trailing earnings and 25 times free cash flows. But sales have more than doubled in the last two years and BYD generates a steady flow of robust profits. If you see Apple as Buffett's ultimate long-term value play, BYD is a very early investment in a tremendously exciting growth sector. And these are still early chapters in the growth story of EV sales.