SAN FRANCISCO -- Chip stocks are battered and bruised, and that's making them increasingly irresistible to some of their peers.

Investors witnessed a prime example of this Friday, when

Samsung

revealed that it is looking over

SanDisk

(SNDK)

, a rival maker of flash memory chips whose stock has plunged more than 50% in the last three months.

In a filing with Korean regulators, Samsung reportedly said that it was exploring all options, including a buyout or an alliance with SanDisk, but that nothing has been decided yet.

The news sent SanDisk's shares up $4.18, or 31% on Friday, to close at $17.64.

The deal would represent a major shake-up in the market for NAND flash, a type of chip used to store data in MP3 players and digital cameras.

But it also underscores how ripe much of the semiconductor market has become for consolidation.

Chipmakers of all stripes have seen stock prices compressed in recent months amid fears that a global economic slowdown will stall sales of the PCs and consumer electronics gadgets that use chips.

On Thursday, the

Philadelphia Stock Exchange Semiconductor Sector Index

, an index of 18 large semiconductor stocks, fell to its lowest level in more than five years.

The deal between Samsung and SanDisk, if it happens, could represent the beginning of a consolidation trend and cause investors to rethink the entire semiconductor sector, says one hedge fund manager.

"If we're going to have a wave of foreign consolidation out there, it would make people think twice about how low these stocks can actually go," he says.

Among the most hated chip stocks on Wall Street are the makers of DRAM and flash memory, whose profits and product prices have been crushed by a severe chip oversupply.

But in spurning memory stocks because of the abysmal market conditions, investors may have overlooked an important potential for upside: Unlike many other chipmakers, memory firms typically maintain their own manufacturing plants. As the memory maker's market caps recede, those assets become bargains.

A few days before Friday's SanDisk news, reports swirled of another potential memory sector merger, this time with

Micron

(MU) - Get Report

snapping up

Qimonda

(QI)

, the troubled maker of DRAM memory chips.

Qimonda shares had been trading between $1.65 and $2.68 since July, down sharply from the stock's $14.20 price following its 2006 listing on the NYSE.

A quote by Micron Investor Relations VP Kipp Bedard, in

The Idaho Statesman

, underscores the allure of a company like Qimonda when it becomes so cheap.

"This particular company we're talking about in Germany is selling at point-four book value. You couldn't build capacity at even close to that price," Beddard said, referring to Qimonda's chip manufacturing assets.

For Samsung, manufacturing capacity may not be the target in its pursuit of SanDisk.

SanDisk owns several fabs through joint-ventures with Japan's

Toshiba

. But as many analysts pointed out Friday, there are numerous regulatory and cultural issues that could hinder the deal, with antitrust issues at the top of the list.

"Samsung currently accounts for 40% of raw NAND production while Toshiba/SNDK account for close to 30%," read a note to investors by Avian Securities on Friday.

"Even if Samsung bought just the SNDK production, regulators in the U.S., Korea, and European among others will likely have issue with one player controlling north of 50% of NAND supply with the closest competitor having only 15%," the note said.

Of course, Samsung could let Toshiba have all of SanDisk's manufacturing capacity and still benefit from the deal by having one less player in the NAND flash market chasing customers and driving down prices.

And with SanDisk's stock price so low, Samsung also gets a cheap way to snag SanDisk's considerable trove of intellectual property, saving itself what analysts estimate to be several hundred million dollars a year in royalty payments.

Friedman Billings Ramsey chip analyst Craig Berger says Samsung's interest in SanDisk makes perfect sense.

"Samsung's been trying to put its memory competition out of business for years. It's not that surprising that they would want to take SanDisk out while they're on the cheap, to further consolidate the market," he says.

But he believes consolidation will not be limited to the memory segment of the chip market. The analog chip sector is particularly fragmented, with many companies at historically low valuations, he says.

Texas Instruments

(TXN) - Get Report

, which is shifting its focus from cell phone chips to its analog chip business, could be one company looking to beef up, Berger says. The company has suggested that current market conditions, while difficult, also present opportunities for Texas Instruments to expand.

Of course, some chip firms have too much luggage, including debt and legal woes, to make them attractive buyout candidates.

And with credit so tight, the pool of potential acquirers is limited to players with strong balance sheets.

Samsung doesn't fit the profile of the typical acquirer -- analysts struggled to recall any major acquisition in the company's recent history.

As share prices continue to slide in the chip sector and the broader market, Samsung's newfound appetite for acquisitions might not look so unusual.