Shareholders of Advanced Micro Devices (NASDAQ:AMD) and Cypress Semiconductor (NASDAQ:CY) have been treated to a roller-coaster ride the last decade. Both companies struggled with profitability as they revamped their product lineup for changing times, creating uncertainty for owners along the way. AMD and Cypress are rebounding, though, and have emerged stronger than ever in their respective areas of expertise in the semiconductor industry.

AMD Chart

Data by YCharts.

New PC chips lead the way

AMD is a diversified chipmaker, but that hasn't done the company any favors. Revenue has been stagnant for years, and operations dipped into the red as new chips were being developed for the personal computing and data center markets. Signs of life have emerged as of late, though, led by the introduction of the versatile Ryzen series of processors for desktop, mobile, gaming, and cryptocurrency mining. Total sales increased 40% year over year in the first quarter, helping AMD get back into the black on the bottom line.

For the current quarter, management sees its rebound continuing with a 50% year-over-year increase in revenue. Those higher sales should lead to more profits, with gross margins expected to improve to 37% from 36% in the first quarter.

AMD's price-to-earnings ratio is 21.6 based on one-year forward  estimates; thatt's pricey, but not too bad considering improving fundamentals. Yet risk is still a factor here. AMD's current liabilities are $1.7 billion and long-term debt at $1.2 billion, with cash at only $1 billion. That doesn't give the chipmaker much wiggle room if things head south again.

An artist's rendition of connected things. Common devices are illustrated in individual cells getting hooked up to the internet.

Image source: Getty Images.

The Internet of Things is the key

Cypress Semiconductor took a different approach to its rebound, first consolidating its memory chip business by purchasing a rival a few years ago. That was followed up with the acquisition of Broadcom's (NASDAQ:AVGO) Internet of Things business in 2016, making Cypress one of the top players in the "connected everything" movement.

Total revenue was up 9% year over year last quarter, led by enterprise and automotive markets. The company also reached profitability again thanks to rising sales and reduced costs after the spending spree a couple of years ago. Upward momentum is expected to continue, although at a slower pace, with management forecasting only a 2% to 6% rise in sales in the current quarter.

Cypress' one-year forward price-to-earnings ratio is only 11.4, making this chipmaker look like a bargain. However, much like AMD, a lot is riding on current positive trends persisting. Cash is at $107 million while current liabilities are $291 million. Longer-term debt is $921 million.

The winner is...

AMD is in a less precarious situation with more cash in relation to liabilities, but Cypress is trading at a discount based on future profitability estimates. If current tailwinds in the semiconductor industry persist, that makes Cypress a better buy at the moment. I also like Cypress because it is a leader in the Internet of Things, finding lots of new uses for its product in consumer and industrial devices. AMD, on the other hand, still relies heavily on personal computing product sales, which are getting a big boost from cryptocurrency mining, but that trend is expected to cool off.

While both chipmakers are rebounding, this story is more about where computing is headed. While the PC and mobile market has seen an uptick as of late and given AMD a boost, I see the future favoring connected devices of all types. If that plays out, Cypress is the better buy here.

Nicholas Rossolillo and his clients own shares of Cypress Semiconductor. The Motley Fool recommends Broadcom Ltd and Cypress Semiconductor. The Motley Fool has a disclosure policy.