HP (NYSE:HPQ) and Cisco (NASDAQ:CSCO) are generally considered mature technology plays, which implies they offer income instead of growth. But over the past 12 months, HP has bucked expectations and rallied 30%, while Cisco has stayed nearly flat.

Let's find out what fueled HP's rally, and what weighed Cisco down -- and see if those factors make the PC maker a better long-term play than the networking equipment specialist.

A man checks his stock portfolio on a smartphone.

Source: Getty Images.

How do HP and Cisco make money?

The "old" HP split in two in late 2015. HP retained the company's PC and printing businesses, while Hewlett-Packard Enterprise (NYSE:HPE) retained its enterprise hardware and software businesses. Last quarter, 62% of HP's revenue came from PC sales, and 38% came from printers and imaging devices.

Cisco is mainly known for selling networking routers and switches, which together generated 44% of its revenue last quarter. The rest comes from its security, wireless, collaboration, data center, and service provider video businesses. Its two highest-growth units are wireless and security -- together, they generated 11% of the company's revenue last quarter.

How fast are HP and Cisco growing?

Both HP and Cisco are slow-growth companies, but HP is growing faster. HP has posted three straight quarters of year-over-year sales growth, while Cisco's sales have fallen for seven straight quarters.

HP's sales were buoyed by market-share gains in the PC market and steady demand for its printers. Gartner reports that although worldwide PC shipments have fallen annually for 11 straight quarters, HP has posted five straight quarters of growth -- which helped it reclaim its title as the world's top PC maker from Lenovo during the second quarter. Strong sales of HP's laptops offset weaker sales of desktops, especially in the U.S. market.

The HP Spectre x2 laptop-tablet hybrid.

The HP Spectre x2. Source: HP.

Cisco's sales of routers and switches have been falling, due to the commoditization of the market and ongoing competition from generic "white box" networking hardware, which runs on open-source software. Its wireless and security businesses are posting positive growth, but they remain too small to offset the ongoing declines at its core businesses.

Wall Street expects HP's revenue and earnings to respectively rise 4% and 3% in fiscal 2017 (which ends this October). Cisco just reported a 3% sales decline and 1% earnings growth for fiscal 2017 (which ended in July), and analysts expect its revenue and earnings to respectively rise 0.5% and 2.5% this year.

How are HP and Cisco evolving?

In previous years, HP's PC business struggled with long upgrade cycles and suffered from the rise of smartphones and tablets. But in recent quarters, HP's sleek Ultrabooks and 2-in-1 devices won back consumers. New, "VR-ready" desktops, like its Omen series, could also eventually boost desktop sales if VR games take off.

As for its printing business, HP diversified into mobile printers for smartphones, industrial 3D printers, A3 copiers, and multifunction copiers. These devices can replace traditional printers and copiers. To boost its market share in A3 and multifunction copiers, the company agreed to acquire Samsung's printing business last September.

Cisco is trying to counter the rise of white box solutions by launching its own cheaper hardware solutions, as well as repeatedly suing its biggest challenger in that market, Arista Networks. It's also acquiring a lot of companies to beef up its higher-growth wireless and security businesses -- it has bought or agreed to buy a dozen new companies since the beginning of 2016.

Lastly, HP and Cisco keep most of their cash abroad, so proposed reductions to the 35% corporate tax rate, if they materialize, could enable both companies to bring their cash back to the U.S. for domestic acquisitions, buybacks, or dividend hikes.

How do HP's and Cisco's dividends and valuations compare?

Cisco currently pays a forward yield of 3.6%, which is comfortably supported by a payout ratio of 54%. HP pays a forward yield of 2.8%, which is supported by a payout ratio of 35%. Therefore, both companies have plenty of room for future hikes.

Cisco currently trades at 16 times earnings, which is much lower than the industry average of 28 for communication equipment makers. HP has a P/E of just 13, which is also lower than the industry average of 21 for PC vendors.

The winner: HP

Cisco pays a higher dividend, but HP's better growth rates and more visible tailwinds make it a better buy at current prices. HP's core PC and printing businesses will likely keep growing at slow and steady rates, whereas Cisco's routing and switching businesses face a murkier future with the disruptive rise of white box alternatives. Cisco is still a cheap income play with limited downside potential, but I believe that HP has more room to run.

Leo Sun owns shares of Cisco Systems. The Motley Fool owns shares of and recommends Arista Networks and Gartner. The Motley Fool recommends Cisco Systems. The Motley Fool has a disclosure policy.