Electronics giant Samsung announced record second-quarter sales of W77 trillion on Thursday, while operating profit reached W14 trillion, the highest for a second quarter in four years (US$1=W1,300).

According to preliminary earnings results, sales increased by 21 percent on-year and operating profit 11 percent.

Analysts attribute the feat to strong demand for memory chips and a strong U.S. dollar, which allowed Samsung to beat runaway inflation and supply chain snags.

Although performance by division is not included in the preliminary earnings, analysts believe that the semiconductor division achieved an operating profit of about W10 billion, which is more than 70 percent of the total. Demand for PCs and smartphones is dropping, but strong demand for chips used in servers by U.S. tech giants like Google propped up earnings.

The strong dollar also helped. An estimated W800 billion increase in operating profit was due simply to the dollar soaring as computer chips are paid for in dollars.

However, finished products like smartphones, TVs and home appliances were hit hard by the global economic slowdown.

Samsung pledged to do what it can to continue earnings growth in the third quarter by promoting premium products. The company is set to release the foldable Galaxy Z Fold 4 and Z Flip 4 next month.

But uncertainties loom. Prices of DRAM and NAND flash memory chips, the company's major cash cow, are expected to keep declining, and demand for server chips could slow due to continued interest hikes and fears of a global depression.

Samsung's stock price, which has been in doldrums, closed up 3.2 percent at W58,200 on the announcement. The company will announce the final second-quarter results on July 28.