Intel (INTC) - Get Report lost its coveted place in iPhones last week. Moments later, it exited smartphone wireless modems. Then something weird happened. The stock rallied.

It's hard to wrap your head around it. Smartphones seem like the center of everything. But demand for the latest and greatest hardware is waning, and that is likely to continue.

So the world's largest semiconductor company, is betting big on software.

Since July 2018, Intel has been a partner of convenience to Apple (AAPL) - Get Report . The previous marriage, between the iPhone maker and Qualcomm (QCOM) - Get Report , its wireless chip supplier, fell apart over royalty payments.

The pair kissed and made up last week. Apple and Qualcomm announced a six-year deal for royalties on key intellectual property, with a two-year option to extend the agreement. Apple will get access to Qualcomm 5G technology right now, raising the possibility of a next generation iPhone in 2020. Previously, analysts speculated those devices might get pushed out into 2021.

The reunion ends Intel's expensive infatuation with smartphones.

Given its scale, the perception it missed the mobile computing revolution hurt Intel's reputation as an innovator. Securing iPhone helped. However, it came at a cost.

Bob Swan, chief executive officer, admitted in a corporate press release that there was no clear path to profitability in smartphone modems. The losses perpetuated a disturbing trend.

The Wall Street Journal reported analysts believe the chip giant may have squandered $20 billion chasing the mobile market since 2013.

Exiting smartphones was long overdue. It allows the company to focus on its hugely profitable data center platform. At last count, Intel had 98% of the data center chip market. It also allows it to pursue the promise of the internet of things, connecting billions of sensors and otherwise dumb devices.

It begins with Cloudification. Intel managers started this strategy in 2011. The basic idea is enterprises, especially telecom networks, can digitally transform their business models by embracing a scalable, programmable cloud architecture built on open standards.

Currently, telecom companies run a mishmash of specialized chips. They control functions like antenna communication, switching and text messages. Cloudification brings dramatically reduced costs, as well as standardized hardware processors, like the ones made by Intel.

It also brings new, open software protocols, like network function virtualization (NFV) and software defined networks (SDN). The surprise is Intel is playing a big role setting those guidelines, too. And software is where the magic begins.

It's the stuff of science fiction. Turning hardware into software changes what is possible.

Sort of like the way Morpheus taught Neo how to break the rules of gravity in The Matrix.

TST Recommends

For example, SK Telecom, the giant South Korea telco, has started to virtualize antennae at the edge of its wireless networks.

According to a story in the Economist, normally this high capacity gear plugs directly into nearby computers. However, SK engineers found a way to morph the radio connections into software code that lives in the central data center. The change means wireless networks throughout the country, can be dialed up, or down as needed, resulting in better efficiency and cost savings.

To get ready for an expected 10x increase in wireless data traffic in the U.S., Intel and AT&T (T) - Get Report , the nation's largest telecom business, began developing NFVs and SDNs in 2015. Virtualization means spinning up network storage capacity with software, not sending out technicians to configure new hardware. It also means new revenue streams.

It's a big change, and the cornerstone of a huge new opportunity for Intel.

During the fourth quarter conference call in February, executives told analysts the total addressable market for data centric infrastructure is estimated to be $300 billion annually. So far, the company is only scratching the surface.

Its data center business grabbed $23 billion in sales during 2018, a 21% increase year-over-year. Profit margins during the fourth quarter were 50.8%.

That kind of momentum, and profitability, helped Intel generate $14.3 billion of free cash flow in 2018. Ultimately the company returned $16.3 billion to shareholders, including $4.5 billion in dividends.

It also propelled full-year revenues to $70.8 billion, a 13% increase year-over-year.

Often investors have difficulty seeing beyond perceived winners and losers. Qualcomm's win becomes Intel's loss. It's not nearly so simple. Companies can win by leaving unprofitable businesses and focusing on strengths.

Intel built a dominant empire supplying hardware to data centers. Managers are leveraging that position to set the software rules for future data centers.

Shares trade at 12.3x forward earnings and 3.7x sales. Given the prospects for its data center business, this is pretty cheap.

The company is set to release first quarter financial results on April 25. Shares are buyable into any major weakness. Shares have a shot at reaching $100 by 2022.

Apple is a holding in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells AAPL? Learn more now.

To learn more about Jon Markman's stock picks at the crossroads of culture and technology, check out his daily investment newsletter Strategic Advantage. To learn about Markman's practical research in the short-term timing of market indexes and commodities, check out his daily newsletter Invariant Futures.

The author does not own any stocks listed in this column.