Western Digital (NASDAQ:WDC) and Cypress Semiconductor (NASDAQ:CY) were both hit hard by a slowdown in semiconductor demand, peaking memory prices, and trade tensions this year. Western Digital, the world's top maker of HDDs (hard disk drives) and the third largest maker of NAND chips, saw its stock drop more than 40% this year due to concerns about peaking growth.

Cypress, which sells a wide range of embedded chips for the automotive, industrial, enterprise, and consumer electronics markets, shed about 15% of its value as concerns about the broader semiconductor market spooked investors. Cypress' exposure to the memory chip market and slowing auto sales exacerbated that pain.

A semiconductor wafer.

Image source: Getty Images.

However, both stocks are now fairly cheap and pay big dividends. WD trades at just 5 times forward earnings and pays a forward yield of 4.4%. Cypress has a forward P/E of 11 and pays a forward yield of 3.3%. Should investors consider those low valuations and high yields to be adequate safety nets for both stocks?

A closer look at Western Digital

WD generates most of its revenue from sales of traditional platter-based HDDs and SSDs (solid state drives), which store data on NAND (flash) chips. WD became a major player in the SSD and flash memory markets after its acquisition of SanDisk in 2016. WD's primary rival in the HDD market is Seagate, and it competes against Samsung, Toshiba, Micron, and others in the NAND market.

WD generated 49.6% of its revenue from HDDs and 50.4% from flash memory devices last quarter. WD's gross margins have traditionally been higher for its SSDs than its HDDs, but sliding memory prices are causing its SSD margins to quickly contract:

 

Q1 2018

Q1 2019

HDDs

31%

32%

Flash

53%

44%

Total

42.3%

38%

Non-GAAP gross margins. Source: WD investor presentation.

Meanwhile, WD's total exabytes sold fell 3% sequentially last quarter, breaking a multi-quarter streak of gains. That decline was led by a 6% decline in HDD exabytes sold, which couldn't be offset by a 28% increase in flash exabytes sold.

Its total HDD shipments fell 19% annually as its growth in data centers failed to offset declines in both client computing and non-compute units. All that pain caused WD's revenue to fall 3% annually to $5.03 billion last quarter, and for its non-GAAP EPS to drop 15%.

Those headwinds won't fade anytime soon. WD still faces a "temporary" slowdown in data center spending, the CPU shortage throttling PC sales, declining NAND prices, and escalating trade tensions throughout 2019. It also plans to cut its wafer output by up to 15% next year to protect its flash margins from further declines. That's why analysts expect WD's revenue and earnings to fall 15% and 50%, respectively, this year.

Four HDDs.

Image source: Getty Images.

A closer look at Cypress Semiconductor

Cypress mostly focuses on niche markets like Wi-Fi/Bluetooth combo chips for IoT devices, auto instrument cluster microcontrollers, auto NOR flash memory chips, SRAM memory chips, and USB-C controllers. It also sells NAND chips for embedded devices, but it's spinning off the unit into a joint venture with SK Hynix to reduce its exposure to sliding memory prices.

Cypress generates about half of its revenue from the higher-growth automotive and industrial markets, and the other half from the slower-growth enterprise and consumer electronics markets.

It splits its business into two divisions: the MCD (Microcontroller and Connectivity Division), which generated 61% of its revenues last quarter, and the MPD (Memory Products Division), which accounted for the rest. Both businesses maintained healthy growth rates over the past year:

 

Q4 2017

Q1 2018

Q2 2018

Q3 2018

MCD

21%

6%

2%

11%

MPD

2%

15%

10%

12%

Total

13%

9%

5%

11%

YOY revenue growth. Source: Cypress quarterly reports.

However, Cypress expects roughly flat revenue growth for the fourth quarter due to some "softness" in its end markets. Cypress also expects the SK Hynix JV, tariffs, and the industrywide slowdown in chip demand to throttle its growth next year. Analysts expect its revenue and earnings to fall 5% and 10%, respectively, next year.

Despite that near-term pressure, Cypress expects the JV, along with long-term content share gains in the automotive and industrial markets, to lift its long-term gross margins to about 50% -- compared to the high 40s it reported in the second half of 2018.

The winner: Cypress Semiconductor

Cypress' focus on high-growth niche markets, its declining exposure to the NAND market, and its expanding long-term margins clearly make it a better overall investment than Western Digital. WD's big bet on SanDisk made it a more cyclical play, and it now faces a major downturn.

Leo Sun owns shares of Cypress Semiconductor. The Motley Fool recommends Cypress Semiconductor. The Motley Fool has a disclosure policy.