Texas Instruments (NASDAQ: TXN) has been a resilient stock this year, even as supply chain challenges and inflation-related fears have rattled the tech sector. The semiconductor maker's stock has also consistently outperformed the S&P 500 over the past three, five, and ten years. Should investors still buy shares of TI today? Let's examine five reasons to buy this blue-chip tech stalwart -- as well as one reason to sell it -- to decide. 1. It's a diversified producer of lower-end chips Texas Instruments doesn't produce high-end CPUs and GPUs like Intel (NASDAQ: INTC) and Nvidia (NASDAQ: NVDA), respectively. Instead, it produces cheaper analog and embedded chips, which support power management, wireless, and data transfer features for myriad devices. These chips aren't very powerful on their own, but they're just as essential as higher-end chips. Image source: Getty Images. TI is also more diversified than Intel and Nvidia, which generate most of their revenue from the PC and data center markets, as well as Qualcomm (NASDAQ: QCOM), which is tethered tightly to the smartphone market. In 2020, TI generated 37% of its revenue from the industrial market, 20% from the automotive market, 27% from personal electronics, 8% from communications equipment, and 6% from enterprise systems. The remaining 2% came from other markets. Those end markets will require more of TI's analog and embedded chips to support newer technologies like 5G networks, the Internet of Things (IoT), artificial intelligence (AI) services, automation platforms, and driverless vehicles. That diversification makes TI a well-balanced play on a wide range of secular growth trends across the tech sector. 2. It manufactures most of its own chips Like Intel, TI is an integrated device manufacturer (IDM) that designs, manufactures, and sells its own chips. Whereas "fabless" chipmakers like Nvidia and Qualcomm outsource all of their production to third-party foundries, TI manufactures its analog chips (which generated 76% of its revenue in its latest quarter) at its own plants. That closed-loop has largely insulated it from the global chip shortage and the traffic jams at TSMC, Samsung, and other third-party foundries. TI isn't completely immune to the chip shortage, since it outsources the production of its embedded and logic chips (which generated the remaining 24% of its revenue last quarter) to third-party foundries in Asia. Delays at other IDMs and fabless chipmakers could also impact TI's own chip shipments by disrupting the production of completed devices and systems. Nonetheless, TI still faces less pressure from third-party foundries than its fabless peers. It won't need to aggressively increase its capital expenditures -- as Intel and TSMC have been doing -- to expand its capacity or design higher-end chips. 3. High gross margins Over the past few years, TI transitioned its plants from 200mm to 300mm wafers. That move reduced its analog production costs by about 40% and boosted its gross margins to industry-leading highs: Source: YCharts In other words, chipmakers don't necessarily need to sell the priciest cutting-edge chips to generate the highest gross margins. TI's success indicates it can also sell lower-end chips at high gross margins by leveraging newer technologies to improve its scale and reduce production costs. 4. Shareholder-friendly measures TI's stable sales and high gross margins enable it to generate plenty of free cash flow (FCF). It also usually returns all of its FCF to its investors through buybacks and dividends. Between 2004 and 2020, TI grew its FCF per share at an average annual rate of 12%. Throughout those 16 years, it reduced its share count by 46% with consistent buybacks while boosting its dividend annually at a compound annual growth rate (CAGR) of 26%. The company currently pays a forward dividend yield of 2.5%, which nearly matches Intel's 2.7% yield. It's also much higher than Nvidia's forward yield of 0.05% and Qualcomm's forward yield of 1.5%. 5. Its post-pandemic recovery TI's revenue rose less than 1% in 2020 as the pandemic disrupted its chip sales to the crisis-stricken automotive and industrial markets. However, its earnings per share still rose 14% as it bought back more shares. This year, analysts expect TI's revenue and earnings to rise 24% and 37%, respectively, as those pandemic-related headwinds fade away. Next year, analysts project its revenue and earnings will increase 4% as the year-over-year comparisons gradually stabilize. The one reason to sell TI: its valuation Texas Instrument's strengths have made it a popular defensive stock this year as inflation-related headwinds have crushed higher-growth tech plays. But, that reputation has also boosted its forward P/E ratio to 23. That multiple is a bit frothy relative to those of its industry peers. Intel and Qualcomm trade at just 14 and 17 times forward earnings, respectively. Skyworks Solutions, which focuses on similar end markets and secular trends as TI, trades at 14 times forward earnings. Therefore, TI's higher valuation could limit its upside potential in this wobbly market. TI's stock isn't a bargain, but I believe its strengths easily justify its current valuation. Investors looking for a semiconductor stock that can reliably beat the S&P 500 over the long run should still stick with TI. 10 stocks we like better than Texas InstrumentsWhen our award-winning analyst team has a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.* They just revealed what they believe are the ten best stocks for investors to buy right now... and Texas Instruments wasn't one of them! That's right -- they think these 10 stocks are even better buys. See the 10 stocks *Stock Advisor returns as of December 16, 2021 Leo Sun has no position in any of the stocks mentioned. The Motley Fool owns and recommends Intel, Nvidia, Qualcomm, Taiwan Semiconductor Manufacturing, and Texas Instruments. The Motley Fool recommends Skyworks Solutions and recommends the following options: long January 2023 $57.50 calls on Intel and short January 2023 $57.50 puts on Intel. The Motley Fool has a disclosure policy.Source