The National Association of Purchasing Management index revealed slower growth in the manufacturing sector during May. The index fell to 53.2 percent compared with April's 54.9 percent.
Slow economic growth is a good sign to the markets because it indicates that the Fed is less likely to raise interest rates. A rise in rates makes borrowing money more expensive and can cool down an overheating economy.
However, investors hope tomorrow's economic data will validate the slow growth trend and convince the Fed to leave interest rates alone.
The Nasdaq composite index rose 181.59, or 5 percent, to 3,582.50, and the Standard & Poor's 500 index gained 28.21, or 2 percent, to 1,448.81.
The Dow Jones industrial average rose 129.87 to close at 10,652.20 led by Hewlett-Packard.
During HP's semiannual analyst meeting, the company's chief executive Carly Fiorina reiterated a forecast for sales growth of 15 percent this year and announced a new sales deal with Amazon.com. Hewlett-Packard's shares rose $14.31, or almost 12 percent, to $134.50
At the end of regular trading, Intel closed up $5 at $129.69. Microsoft also climbed $2 to $64.56.
A federal judge today granted the government's request to file more legal briefs in the Microsoft antitrust trial, delaying a ruling that had been expected for later this week.
The CNET tech index rose 110.05 to 2,683.13. Winners thrashed losers, with 86 of the 98 stocks in the index rising, 10 falling and two remaining unchanged.
Of the 18 sectors tracked, server hardware makers posted the strongest gains, rising about 8 percent. Computer distributor firms were the day's largest losers, sliding 1 percent.
The initial offering of ONI Systems, an optical network equipment maker, was the biggest percentage gainer on the Nasdaq. Its shares jumped $57.56, or 230 percent, to $82.56. Volume topped 15.8 million shares.
UTStarcom was the Nasdaq's largest loser, falling $17.56, or nearly 46 percent, to $20.69 on a volume of 10.7 million shares more than 28 times its average daily trading volume over the past 50 days.
UTStarcom, a telecommunications equipment maker, of which Softbank owns 50 percent, said China's government asked it to halt some phone-system installations.
Among members of the CNET Tech Index, Broadcom and VeriSign posted strong gains.
Broadcom rose $14.56, or 11 percent, to $144.63 and VeriSign climbed $19.19, or 14 percent, to $154.56. PMC-Sierra also gained $16.75, or about 11 percent, to $170.
Shares of IBM did not join the party. The computer giant fell $1.31 to $106.
The Philadelphia semiconductor index rose 68.85, or almost 7 percent, to 1,067.28, led by chip designer Rambus, which gained $21.19, or 12 percent, to close at $197.44.
Internet service provider Juno said today it has filed a lawsuit against NetZero and Qualcomm, alleging that the two companies have infringed Juno's email advertising patent. Juno rose 31 cents to $8.38, Qualcomm gained $2.63 to $69, and NetZero fell 44 cents to $7.50.
The markets might see some heavy trading tomorrow after the government releases economic data that is highly scrutinized by the Federal Reserve during interest rate policy decisions. Data on unemployment, average hourly earnings and non-farm payrolls will be released in the morning.