There are a lot of very expensive tech stocks. By buying them, you're paying a high price for future growth that may or may not materialize. Some of them -- perhaps even many of them -- will be disasters in the long run.

On the other side of the coin, there are some tech stocks that have languished even as the stock market has surged to new highs. International Business Machines (NYSE:IBM) and Cisco Systems (NASDAQ:CSCO) come to mind. Both stocks have been beaten down by pessimism and offer investors solid value at a time when value is hard to come by. Here's why these two cheap tech stocks belong in your portfolio.

International Business Machines

It's been quite a while since IBM has been a pleasant stock to own. Shares of the century-old tech giant topped out in 2013 at over $200. Over the next six years, the stock erratically tumbled to around $130 as the company's transformation efforts failed to win over investors. IBM is a different company than it was earlier this decade, but growth in cloud computing, artificial intelligence, and other trendy areas has so far failed to offset declining legacy businesses.

At the current stock price, IBM trades for just about 10 times the company's guidance for full-year adjusted earnings. That guidance accounts for charges related to the mega-acquisition of Red Hat, which has the potential to turbo charge IBM's cloud business. IBM has a multibillion-dollar cross-selling opportunity ahead of it as it sells existing customers on Red Hat software, and Red Hat's ecosystem can also drive increased sales of IBM software.

IBM's z15 mainframe.

IBM's z15 mainframe. Image source: IBM.

IBM's dividend is also nothing to sneeze at. The $1.62 per-share quarterly payout works out to a yield of nearly 4.9%, and dividend payments eat up less than 50% of the company's free cash flow. That leaves plenty of cash left over for IBM to pay down the debt it accumulated to make the Red Hat deal happen.

In the near term, IBM's revenue will almost certainly grow in 2020. Red Hat will provide some of that growth, although accounting rules are complicating how much of Red Hat's revenue IBM can recognize. The venerable mainframe business will provide a tailwind, as well, with the new z15 system now shipping to customers. For most of 2020, IBM's hardware business should see a nice sales lift as mainframe customers upgrade to the new systems.

It's easy to be pessimistic about IBM, given the company's and stock's performance over the past five or six years. But the best value stocks are those that seemingly everyone has given up on. IBM definitely fits the bill.

Cisco Systems

Networking-hardware leader Cisco is going through a downturn. After a couple of years of solid growth, the company now expects its revenue to shrink by 3% to 5% in its fiscal second quarter. During the most recent earnings call, CEO Chuck Robbins talked about customers pausing and deals taking longer to complete, a clear sign that economic uncertainty is negatively affecting Cisco's business.

This is nothing new for Cisco. Revenue slumped for much of 2016 and 2017, thanks to economic uncertainty, only to surge higher once that cycle had fully played out. The difference today is that the odds of a recession may be higher, potentially prolonging the current downturn in sales.

But if you're investing in an individual stock, you should care about the long term. Cisco remains the dominant provider of enterprise networking equipment. The company claimed a 51.1% share of the Ethernet switching market in the second quarter, despite no shortage of lower-cost competition. The company's recent subscription push, bundling some hardware with software and services, only works to cement its lead.

Based on the average analyst estimate for adjusted earnings, Cisco stock currently trades for about 13.5 times earnings. While earnings may come under pressure as Cisco's customers pull back, there's little reason to believe they won't grow in the long run. Throw in a dividend yield of 3.2% and you've got a solid dividend value stock on your hands.

Cisco's results aren't going to look great for a while. But for long term investors, that shouldn't really matter.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.