After a year-and-a-half of booming sales during the pandemic, the PC industry finds itself in the midst of a historic slump. According to market intelligence firm IDC, consumer PC shipments were down 15% in the third quarter, and the two largest U.S. PC companies by shipments, HP Inc. (HPQ -0.25%) and Dell Technologies (DELL -1.04%), were down by even more. Their shipments declined by 27.8% and 21.2%, respectively.

Yet both of their stock prices actually rose after the companies delivered their latest quarterly reports, despite revenue declines and downbeat guidance. For value investors who favor stocks with low price-to-earnings ratios and high dividend yields, both of them may be worth exploring. After all, even Warren Buffett has a sizable stake in HP.

More than just PCs

People may be most familiar with the consumer PC divisions of both Dell and HP, but both companies actually have extensive operations in other products as well. In fact, PCs provide a minority of their operating profits.

Dell's infrastructure division, which sells servers and related services to data center and cloud operators, overtook its PC division in terms of overall operating profit last quarter. Thanks to the fulfillment of its backlog and cost controls, Dell's infrastructure business grew revenue by 12% and operating income by 54% to $1.38 billion. That surpassed the PC division, which saw revenue decline 17% and operating income fall 7% to $1.06 billion.

For HP, its non-PC operations consist of its printing solutions division, which sells commercial printers, consumer printers, 3D printing systems, and the high-margin consumables that go into them.

People are printing fewer paper documents than they used to, so that division is in decline. But it also has a much higher operating margin than the PC division -- 19.9% last quarter. The printing division's operating profit was already higher than that of the PC division last year, even with lower revenue. While the printing division's revenue declined by 7% year over year last quarter, its operating profit actually increased 8.8% to $903 million thanks to the company's cost-controlling efforts. That compares to just a $458 million operating profit for HP's PC division.

Repurchases, dividends, and low valuations

Dell and HP have a lot in common financially. Both are primarily hardware companies with cyclical businesses, although Dell has more services in its arsenal, as it has developed several multi-cloud and private cloud infrastructure software offerings, along with cybersecurity software and consulting services. HP doesn't have that, as it spun off its enterprise server and services divisions into HP Enterprise (HPE 0.06%) back in 2015.

Still, each company looks similar in many respects. Dell trades at just 6.8 times next year's earnings estimates, while HP Inc. trades at about 9 times next year's estimates. However, despite its slightly higher valuation, HP has a higher dividend yield, at 3.6% versus Dell's 3%, based on their current share prices.

Both companies also buy back a lot of their stock. HP executed $4.3 billion worth of share repurchases during the fiscal year that ended on Oct. 31, retiring about 12% of its shares outstanding. Meanwhile, Dell repurchased nearly $3.1 billion of its stock over the past three quarters, or about $4.1 billion on an annual run-rate basis -- nearly the same as HP. That could amount to a similar percentage of Dell's stock. Its market cap is roughly $32 billion, while HP's is $30.2 billion.

The choice: data centers or printing?

Since both stocks appear to be strikingly similar in terms of yield, valuation, and other characteristics, the choice between Dell and HP comes down to which non-PC business one thinks will perform better over the long term: data center servers or printing.

From my perspective, it's the data center business. New applications such as artificial intelligence, edge computing, and the metaverse (if and when that goes mainstream) will all require much more computing power, and therefore more servers. So, that segment, while cyclical, appears to have better long-term growth prospects than printing. While that industry is a bit more competitive, Dell has the No. 1 market share, so it should be able to grow along with the sub-sector.

That's not to say printing is such a terrible business, and HP does dominate it with a nearly 40% market share. It's also a highly profitable business that throws off cash. Yet while some printing will inevitably stick around, that business does appear to be in a slow, long decline.

One thing that could change the calculus is if HP's young 3D printing solutions unit takes off in a big way. But HP doesn't even break out the results for its 3D printing segment on a stand-alone basis, so it's probably pretty small today.

However, for value investors looking for cheap stocks with dividends, cash flows, and leadership positions in their respective categories, both of these PC-related stocks could make fine choices. While I prefer Dell, Buffett opted for HP, buying nearly $3.8 billion worth of its stock in 2022's first quarter. Shares are now trading well below the level where he bought in, so investors today will be getting an even better deal than Buffett did.