The U.S.-China trade standoff and a potential oversupply in the chip industry have sent tech stocks spiraling downward over the past six months, with the NASDAQ-100 Technology Sector index losing nearly 12% of its value over this period. Not surprisingly, some major tech names have witnessed a massive crash as spooked investors decided to cash out.

NVDA Chart

NVDA data by YCharts.

But an upside to this massive crash is that NVIDIA (NASDAQ:NVDA) and Micron Technology (NASDAQ:MU) are trading at really cheap valuations. These stocks are trading way below their five-year average price-to-earnings (P/E) ratios, giving savvy investors a solid opportunity to get into some lucrative long-term plays.

NVDA PE Ratio (TTM) Chart

NVDA PE Ratio (TTM) data by YCharts.

NVIDIA's massive opportunities

NVIDIA shares have been hurt thanks to the fading of the cryptocurrency mining craze, which has left the company with a lot of unsold inventory. But the graphics specialist believes that the problem won't last beyond a couple of quarters, which isn't surprising as the PC gaming business isn't expected to run out of momentum anytime soon.

Miniature boxes in a toy shopping cart placed on a laptop keyboard

Image source: Getty Images.

The drop in graphics-card pricing following the cryptocurrency boom is driving up PC demand as gamers are now able to afford those units. In fact, demand for high-end PC gaming hardware was growing at a terrific pace before the crypto boom arrived, increasing 40% in 2017 to $40 billion. So, once the sales channels normalize over the next couple of quarters and NVIDIA's new graphics cards find their way to retailers, the company's crucial video gaming hardware business should be back on track.

That's because the company is sitting on a massive addressable market as 30% of its installed base of users are on previous-generation graphics cards. This sets the stage for a strong upgrade cycle at NVIDIA, because gamers would eventually need to upgrade to better graphics cards to run graphics-intensive games.

But that's not the only catalyst NVIDIA is sitting on. The company's data center business shot up 58% annually last quarter, and it won't be losing momentum anytime soon thanks to emerging trends such as artificial intelligence (AI). NVIDIA's graphics cards are being deployed by major cloud players as they perform a critical role in the training of AI models.

What's more, the chipmaker has bolstered its data center presence of late by launching a GPU for inferencing purposes. NVIDIA believes it can make its way into the $20 billion AI inferencing market with this move.

In all, NVIDIA is going after some really lucrative markets such as self-driving cars that should ensure solid long-term growth, making the stock a nice bargain at its current valuation.

Micron believes it's different this time

Micron Technology is (in)famous for being reliant on the boom-and-bust cycles in the memory industry. The memory specialist made investors a lot of money when dynamic random access memory (DRAM) and NAND flash memory prices were soaring. But things have changed drastically over the past few months as clear signs of oversupply have been emerging.

The company's financial performance is expected to nosedive in the near term, but management is confident that the storm will soon pass. Micron customers have slowed down their memory purchases as prices have declined, causing an oversupply in the sales channel. But management believes that the inventory adjustment will be over in a couple of quarters, and demand should pick up the pace again.

There are a few solid reasons why Micron's prophecy could turn out to be true. For one thing, memory-industry players are expected to keep a handle on their capacity expansion plans to keep output under control.

For instance, Micron has already announced that it will cut capital expenses, to the tune of $1.25 billion in 2019. The company is currently planning to boost output by 15% this year as compared to the earlier forecast of 20%. Samsung has also elected to stop expanding capacity at the Pyeongtaek fabrication plant, a move that will reduce its annual output increment to 20%, which will be its lowest increase in the past few years.

In all, memory suppliers are expected to reduce their capital expenses by 10% in 2019, a move that should help lower supply and thus boost prices. According to DRAMeXchange, DRAM prices could fall 15% during the current quarter and 10% in the second quarter of 2019. The price decline should slow to just 5% in the second half of the year, though an increase in demand might actually lead to an improvement in pricing.

IDC forecasts that smartphone sales will increase 2.6% in 2019 after dropping an estimated 3% last year. That could help support memory demand, as the average smartphone memory size has been increasing rapidly, with devices packing more and more memory. But that's not the only potential demand driver for the memory industry in 2019.

PC sales, for instance, are expected to recover slightly in 2019. Additionally, memory demand is expected to be driven by emerging technology trends such as autonomous cars, an opportunity that Micron is going after. The chipmaker has been selected by Intel's Mobileye to supply memory to develop its fifth-generation self-driving car platform.

Patience will be the key

Investors, however, should note that these stocks could witness near-term pressure because of the headwinds outlined earlier. But the long-term opportunity seems too good to pass up, especially considering the valuation levels of Micron and NVIDIA. Value investors looking for fast-growing tech stocks might consider buying these two chipmakers, because they can get back on track once the headwinds subside.

Harsh Chauhan has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Nvidia. The Motley Fool has a disclosure policy.