Gould Inc., the Rolling Meadows, Ill.-based high-technology company, said yesterday that it will take a $150 million second quarter write-off that reflects a substantial reduction in the size of its semiconductor operations.

Gould said that, excluding the write-off, it expects earnings from continuing operations for the second quarter to be about 15 percent below the 41 cents a share it earned in the first quarter this year. The company also said that, excluding the write-off, its earnings for the year are expected to be slightly below the $1.98 a share reported in 1984.

"The extreme contraction and realignment in the semiconductor industry brought on by intense foreign competition and excess worldwide capacity have caused a sharp drop in semiconductor prices," Gould Chairman William T. Ylvisaker said yesterday. "We are therefore taking every measure to return our semiconductor operation to profitability at a lower revenue base . . . As a result of the special write-off and substantial cost reduction measures, we expect that our semiconductor operations will return to profitability during the second half of 1985."

Ylvisaker, who has guided Gould's transformation from a battery and auto parts company to a high-technology firm, said the major focus of the company's semiconductor operations in the future would be in customized products. He said the company's production of customized semiconductors in 1985 is above 1984 levels.

When Gould completed the sale of its lead acid battery division in 1983, it severed the company's last ties to the business for which it was known for more than 50 years. In addition to semiconductors, the company has interests in microcomputers, factory automation and sophisticated electronic equipment used in the medical and defense fields.