If a company continues operations for more than a century, that means it has some serious staying power. Companies today that have been around for more than 100 years survived the Great Depression, Black Monday, as well as the dot-com and real estate bubbles of recent years. The following three companies have histories extending over 100 years, each trading near 52-week lows and presenting investors with an opportunity to buy a quality company at a fair price. 

Big Blue is a buy
Shares of IBM (NYSE:IBM) are a mere 30 basis points above their 52-week low. This is easily one of America's most prestigious and successful enterprises we're talking about. IBM has been the leading patent recipient among American companies for each of the past 20 years. The ATM, floppy disks, the magnetic stripes that make credit cards possible, and our system of barcodes are all thanks to the folks at IBM.

True, those inventions are irrelevant to IBM's bottom line these days. But they demonstrate IBM's talent as a disruptive innovator, an innovator responsible for several products that radically increased the efficiency of both businesses and individuals. In 2012 it received 6,478 patents, a record for the company. Clearly ingenuity is alive and well at IBM.

In decades past the company's bread and butter was hardware. But it wisely changed its focus from physical machines to software. In the information age, enormous success will go to the company that proves most adept at collecting and analyzing data to discover where improvements can be made. IBM realizes this and has shifted its strategy accordingly.

These days IBM's inventions are centered around the concept of cognitive computing. While the creation of such systems is incredibly complex, the idea behind them is not. Cognitive computing systems learn from their environments, they have artificial intelligence. As these systems gain knowledge over time, their utility increases.

Cognitive computing systems have the potential to positively impact countless aspects of our lives. Consider the following applications IBM has already received a patent for: Integrated into a refrigerator, data on temperature and odors can be analyzed to determine if the food inside is fresh or not; a cognitive computing system can help retailers fight shoplifting by examining data from prior thefts; and IBM technology is enabling hospitals to create a massive, easy-to-use, database of medical records from patients all over the globe. IBM is at the forefront of artificial intelligence, a technology that appears to have limitless possibilities. 

Shell shares are down 
Shares of Royal Dutch Shell (NYSE:RDS-A) are just 2.15% above 52-week lows. Several bits of bad news have helped drive shares down. Not wanting to miss out on the American energy revolution, it shelled out big bucks to purchase shale properties in the United States. As it turns out, Shell may have overpaid. Its assets were recently reduced by $2.1 billion in a writedown the company said was predominantly related to its North American shale properties. 

The writedown, along with other factors, contributed to second quarter profits declining by 60%. This deluge of bad news has most investors staying far away from Shell, but it also presents an opportunity to the individual investor with the courage to make a contrarian investment.

RDS.A Dividend data by YCharts

Shell has paid decent sized dividends for over 20 years. After the walloping shares have taken, the trailing dividend yield is an impressive 5.5%. Combine that with a payout ratio below 40% and you've got a juicy dividend that will very likely be maintained.

Shell's price-to-earnings ratio (calculated using 2010-2012 avg normalized, diluted EPS) of 7.64 and its price-to-tangible-book ratio of 1.17 are both the lowest among major oil companies. Such low ratios from a company that more than doubled its earnings per share and operating cash flow between 2009 and 2012 are something for investors to be excited about. Heck, even Shell thinks Shell is cheap right now; the company has been buying back shares hand over fist lately.

Another big oil company trading near 52-week lows
Shares of BP (NYSE:BP) are 4.39% above 52-week lows. While I do believe that BP is a quality company with a solid history of profitability, I don't think investors should invest in BP when Shell appears to be a better buy. I believe the following chart proves my point.

     BP         Shell    
P/E Ratio*:   9.04     7.64
Trailing Dividend Yield:    5.2%     5.5%
Payout Ratio:   26%     34%
Price-to-Tangible-Book Ratio:   1.42     1.17
Total Debt-Equity Ratio:     .36      .19
Sales Growth (3 year CAGR):  16.9%    18.5%
Net Income Growth (3 year CAGR)**: Declined    28.6%

*calculated using 2010-2012 avg normalized, diluted EPS
**Normalized net income

As you can see, Shell beats BP in nearly every category on that list. Shell has grown sales and profits more quickly than BP. Shell has less debt than BP. Shell pays more in dividends than BP. The only category on that list where BP beats Shell is the dividend payout ratio, an area where BP is only marginally better. It would be tough to argue that BP is a better buy than Shell right now.

Foolish final thoughts
When the stock of a quality company hits 52-week low territory, as is the case with these three companies, an investigation is in order. IBM is creating technologies that harness the awesome power of artificial intelligence to create what it calls a smarter planet. And a smarter planet is a better planet. I'd be willing to wager no company will improve the quality of human life more than IBM over the next 50 years. Companies that drastically improve our quality of life, and their shareholders, will be well rewarded.

Demand for crude oil and natural gas will still be there in 50 years. As such "Big Oil" companies make perfect sense as a long term investment, provided the price is right. Two companies in that category are trading near 52-week lows, BP and Shell. Shell has grown revenues and profits faster than BP, pays more in dividends, and has less debt. Shell shares have been hit hard; buying in now should serve you well in the long run.