HOUSTON (AP) _ Compaq Computer Corp. took a $3.6 billion hit in the second quarter because of huge charges related to its purchase of Digital Equipment Co. and plant closings.

But the computer maker's results without the charges were slightly above Wall Street expectations. The comany's stock fell 12 1/2 cents to close at $33.56 1/4 on the New York Stock Exchange.

Compaq's loss reported Wednesday amounted to $2.33 per diluted share for the April-June quarter in contrast to a profit of $257 million, or 17 cents a share, a year ago.

Sales rose 5.7 percent to $5.8 billion from $5.5 billion a year ago.

The loss resulted from $3.63 billion in charges relating to its acquisition of Digital Equipment and closing selected Compaq facilities.

Without the charges, the company reported net income for the quarter of $32 million, or 2 cents per share. Analysts surveyed by First Call Corp. had expected the company would break even for the quarter.

Compaq announced last month that it is closing six plants overseas and eliminating 5,000 jobs, including 1,000 at its Houston headquarters as part of a previously announced cost-cutting drive following the Digital acquisition.

Most of the layoffs were at Digital, which had 54,000 employees when it was acquired in early June.

The plants to be closed include two in Scotland and one each in Brazil, China, Singapore and Taiwan. The company is also closing operations in Australia, Brazil and Japan used for final assembly of computers for shipment to customers.

For the first half, Compaq lost $3.6 billion, or $2.35 a share, in contrast to a profit of $671 million, or 43 cents a share, a year earlier.

Sales for the first half rose to $11.5 billion from $10.8 billion a year ago.

Compaq, founded in 1982, is the second-largest computer company in the world and the largest personal computer manufacturer.