The companies that make the microchips that undergird some of today's most advanced technologies often also make excellent investments. That's exactly why both Texas Instruments (NASDAQ:TXN) and NVIDIA Corp. (NASDAQ:NVDA) are worth taking a close look at it.

Between them, those two have hardware in everything from mobile devices to semi-autonomous vehicles to and artificial intelligence platforms. Both companies' shares performed well in 2017, with NVIDIA  stock gaining 81% and Texas Instruments rising 43%. But which chipmaker is the better buy right now? Let's consider.

Dark blue microchip on motherboard.

Image source: Getty Images.

The case for Texas Instruments

Texas Instruments makes most of its money from two business: its embedded processors and its analog segment. The former features hardware like processors and memory chips, while the latter includes logic hardware for automotive safety systems, touch screen controllers, and a variety of sensors. And in both segments, business in booming.

In the fourth quarter, sales from Texas Instruments' embedded division jumped by 20% to $896 million. Analog segment revenue grew by 11%  year over year to $2.5 billion.Total revenue in Q4 was up a solid 10% from the same period a year ago, reaching $3.7 billion, and TI's largest segment -- analog -- increased its operating profit by 20%. Additionally, full-year revenue rose by nearly 12% to $14.9 billion.

On top of all of this, the company has a long history of looking out for its shareholders. TI's dividend yields 1.9% right now, and it increased the payout be about 24% back in September. Factoring in both dividends and stock repurchases, it returned $4.7 billion in cash to shareholders in 2017.

Yet even with the company's strong performance, TI's shares trade at about 20 times the company's forward earnings, which is far below the tech industry average as a whole.

The case for NVIDIA

NVIDIA sells chips like TI, but that's about where their similarities end. The company's bread and butter is graphics processing units (GPUs), which it primarily sells for the PC gaming market. Sales of those GPUs  contributed about 59% of the company's top line in its fiscal third-quarter 2018, up about 25% from a year prior.

And while NVIDIA's gaming business continues to hum along nicely, it's the company's opportunities in artificial intelligence and driverless vehicles that have gotten investors excited lately. It turns out that GPUs do a fantastic job of processing the enormous quantities of image information that semi-autonomous driving systems take in to perceive their surroundings; NVIDIA is also using its tech to create its own semi-autonomous driving computers -- most recently, the Drive PX Pegasus.

The automotive segment only contributes about 7% of NVIDIA's top line right now, but management believes its total addressable market (TAM) in the growing driverless car business will be worth $8 billion by 2025.

Additionally, NVIDIA's GPUs are being used for high-performance AI processing, and tech giants (think Facebook, Amazon, and Alphabet) have tapped NVIDIA for their AI data center processor needs. Sales in the company's data center segment are up 108% year over year, and NVIDIA estimates its AI TAM will be worth about $32 billion over the next few years.

In contrast to Texas Instruments' relatively juicy payout, NVIDIA's forward dividend yield is a slender 0.25%, and its shares trade at a hefty premium of 52 times estimated forward earnings.

The verdict

Both of these companies are performing well overall, and doing a fantastic job of positioning themselves for growth in their respective markets. But it's getting difficult to look past NVIDIA's high valuation, despite all of its potential. With NVIDIA's shares now trading at more than 50 times the company's forward earnings, I have to give Texas Instruments the win, because it has both long-term potential and looks less expensive.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.