SEOUL, South Korea (AP) — South Korean chipmaker SK Hynix reported a small net profit in the third quarter Wednesday thanks to a foreign exchange gain that partly offset lower sales of computer memory chips.

SK Hynix Inc. said it posted 2 billion won ($1.8 million) in net profit for July through October on revenue of 2.4 trillion won.

Icheon, South Korea-based Hynix is the world's second-largest maker of computer memory chips that help run multiple programs quickly. It trails behind Samsung Electronics and also competes with Micron Technology and Toshiba.

Analysts forecast an 80.8 billion won net loss, according to financial information provider FnGuide. The better-than-expected result compares with a net loss of 563 billion won a year earlier. Its quarterly revenue was 5.8 percent higher than a year earlier.

Hynix share rose 4 percent in Seoul following the earnings report.

Its third-quarter operating loss was 15 billion won compared with a 277 billion won loss a year earlier.

Hynix said increased sales of mobile chips and flash memory devices helped limit the impact from the PC industry slump.

Research firms IDC and Gartner said global PC sales dipped more sharply than expected during the third quarter as consumers shift their spending to smartphones and tablets. Some delayed replacing their existing PCs with a new one before the launch of a new version of Windows.

Hynix has been trying to reduce its reliance on computer memory chips and increase the portion of components for mobile devices as the weak economy continues to depress the PC industry. Its clients include Hewlett-Packard, Dell and Apple.

Hynix said global memory chipmakers are expected to slash their investments next year due to the slump in the PC industry and the uncertainty in the global economy. That could help improve the memory chip industry, which has been struggling with oversupply and sluggish PC demand.