On the surface, International Business Machines' (IBM -1.05%) second-quarter earnings report was a mixed bag. While the century-old tech giant beat analyst expectations for profit, a slight revenue decline came up short of what analysts were expecting in the July 19 report.

Under the surface, IBM's results paint a picture of a company making solid progress. The revenue decline was due solely to the hardware business and the product life cycle dynamics of the company's mainframe business. Both software and consulting posted strong growth, and IBM stuck with its guidance for the full year.

The AI opportunity

IBM has put two technologies at the center of its transformation efforts: hybrid cloud computing and artificial intelligence.

One of the core strengths of IBM's business model is that all the pieces of the company feed back into each other. A client that wants to move its IT infrastructure to a cloud-based architecture may tap IBM's consulting arm for guidance and help with implementation. That engagement can then drive sales of IBM's software, particularly Red Hat's OpenShift container platform.

OpenShift is now at a $1.1 billion annual recurring revenue run rate, but that's not the only way IBM leverages its acquisition of Red Hat. Within the consulting segment, IBM has built a multibillion-dollar consulting business around Red Hat's hybrid cloud platform.

IBM is looking to do the same with AI. The company is positioning Watsonx, its new AI platform aimed at helping enterprises deploy and manage AI models, as the core of its AI business. While the platform itself will generate revenue for the software segment, the company has staffed a "Center of Excellence for Generative AI" within its consulting arm with 1,000 AI specialists.

The goal is to not only provide the technology and software to enable clients to deploy AI, but also to provide guidance navigating a rapidly changing technological landscape. IBM has the potential to build a massive consulting business around AI, which will help drive consulting revenue higher in the years ahead.

Good results and a rock-bottom valuation

Overall, IBM's second-quarter results looked just fine. Total revenue of $15.5 billion was down slightly thanks to a double-digit decline in infrastructure revenue, but both software and consulting performed well. Total software revenue jumped 7% year over year adjusted for currency to $6.6 billion, driven by growth in transaction processing, Red Hat, and AI solutions.

Meanwhile, consulting revenue rose 6% year over year to $5 billion, with growth across the board. Business transformations, the biggest piece of the consulting segment, enjoyed 5% growth. The tough macroeconomic environment is causing clients to pull back on smaller, more discretionary projects, but IBM is seeing persistent demand for the kind of large transformation projects that produce meaningful returns on investment for clients.

One reason IBM can produce good results even in deteriorating economic conditions is its focus on helping clients save money and increase productivity. The company stuck with its guidance for the full year, which calls for revenue growth between 3% and 5% adjusted for currency and free cash flow growth of more than $1 billion to approximately $10.5 billion.

IBM is valued at about $125 billion following a post-earnings rally. That puts the price-to-free-cash-flow ratio at just 12. Add in a dividend that yields close to 5%, and it's hard to argue that IBM isn't a bargain for value investors and dividend investors alike.