The past year has been a mixed one for chipmakers. Sierra Wireless (SWIR), often touted as a "pure play" on the Internet of Things (IoT) market, has fallen more than 40% over the past 12 months. But Nvidia (NVDA -3.33%), which is best known for its GPUs, has surged more than 140%. Let's take a look at why Sierra slumped as Nvidia soared, and whether or not it makes sense to buy the former and sell the latter.

Image source: Getty Images.

Sierra Wireless' strengths and weaknesses

Sierra is the world's largest manufacturer of 2G, 3G, and 4G embedded modules and gateways. These tiny chips connect objects to the cloud and each other, forming the fabric of the growing IoT market. The number of connected devices worldwide is predicted to double from 25 billion in 2015 to 50 billion in 2020. Bullish forecasts like that propelled the stock to nearly $50 in early 2015.

Unfortunately, sluggish enterprise spending, macro headwinds in certain markets, and competition from cheaper Chinese rivals caused the company's year-over-year sales growth to drop from double-digit to single-digit levels last year, before turning negative over the past three quarters. Analysts currently expect Sierra's revenue to rise just 0.5% this year, compared to 8% growth in 2015.

Despite those challenges, Sierra's gross margin expanded 140 basis points annually to 33.8% last quarter -- indicating that its market-leading products were holding off the cheaper competition. Those margins should continue improving as Sierra scales up by acquiring smaller wireless connectivity players like Maingate, Mobiquithings, and GenX Mobile. Sierra's earnings are still expected to fall 34% this year on lower sales and higher operating costs, but might rebound 44% next year as those headwinds dissipate.

Nvidia's strengths and weaknesses

Nvidia is the world's biggest maker of high-end gaming GPUs. Dominating this market insulated Nvidia from the global slowdown in PC sales, since high-end gamers are generally more keen on upgrading their GPUs than business or casual users. Gaming GPUs still generate the lion's share of Nvidia's revenue, but it's also been expanding into adjacent markets like connected cars and data centers.

Image source: Nvidia.

In connected cars, Nvidia's mobile Tegra CPUs power infotainment and navigation systems. It also offers a "driverless supercomputer," the Drive PX platform, which helps automakers produce autonomous vehicles. In data centers, major partners like IBM are installing its high-end Tesla GPUs alongside their CPUs to boost machine learning and AI-related tasks. That's because GPUs, with their rapid floating-point calculations, often process those tasks faster than comparable data center CPUs like Intel's (INTC 0.64%) industry standard Xeon chips.

Nvidia's strength across all three businesses fueled its double-digit annual sales growth over the past three quarters. Analysts expect Nvidia's revenue to rise 22% this year, compared to just 7% growth last year. Earnings are expected to soar 71% this year, compared to a 4% decline last year. Those near-term numbers look solid, but Nvidia's sales and earnings are only expected to respectively rise 7% and 4% in fiscal 2018. That's mainly because the chipmaker's cross licensing deal with Intel, which feeds it $66 million per quarter in "free revenue", is set to expire in early 2017.

What the valuations tell us

Sierra Wireless' trailing P/E of 104 initially looks very lofty relative to its earnings growth, but its forward P/E of 18 looks more sustainable. Moreover, the stock trades at just 0.6 times its enterprise value of $328 million, which makes it a cheap buyout target for larger chipmakers looking to expand their presence in the IoT market.

Nvidia trades at 44.5 trailing earnings, 35 times forward earnings, and about 6 times its enterprise value of $32.8 billion. Nvidia's P/E multiples might not look cheap, but they're actually much lower than the industry average of 75 for specialized semiconductor companies, and compare favorably to its aforementioned growth rates.

Looking ahead, analysts expect Sierra's annual earnings to grow at an average rate of 16.5% over the next five years. This gives the stock a 5-year PEG (price-to-earnings growth) ratio of 1.7. Since a PEG ratio under 1 is considered "undervalued", Sierra doesn't look cheap relative to its earnings growth potential yet. Nvidia's annual earnings are expected to rise 23.7% during that same period, which gives it a slightly cheaper (albeit not undervalued) PEG ratio of 1.6.

The winner: Nvidia

It might be tempting to buy Sierra Wireless as a turnaround play on the Internet of Things, but the stock could remain under pressure if headwinds persist. Meanwhile, Nvidia has already had a great run over the past year, but its valuations suggest that it could still have room to run. However, investors should be mindful of the expiration of the Intel cross-licensing agreement, which could result in unfavorable year-over-year comparisons next year.