The new Jimmy Carter is racing the engine of the defense industry.

General Dynamics, the nation's biggest military contractor, is already at the drawing board in hopes of cashing in on Carter's decision to let American companies design and build warplanes specifically for foreign nations. The president had banned this in May 1977, in an effort to curb trafficking in arms.

McDonnell Douglas, United Technology, Lockheed and Boeing all see millions coming their way as Carter buys planes needed to deliver his proposed new Rapid Deployment Force to distant spots on the globe.

General Electric, one of the defense industry powers, and Vought Corp., one of the weaklings are both expected to make money from accelerated development of space weapons as Carter's effort to negotiate a ban on antisatellite weapons founders.

And Litton, which made millions building the Navy's new family of destroyers, sees some more of the same coming from Carter's recent decision to scrap his old shipbuilding program for a more generous one -- 95 instead of 67 warships over the next five years.

In short, very good times indeed are just around the corner for many defense contractors, large and small if Carter's new plans are approved by Congress. The president's fiscal 1981 defense budget, going to Congress this month, calls for spending $142 billion, 11 1/2 percent higher than this year's figure.

Defense executives are optimistic about their future prospects under Carter but are not yet willing to predict boom times. Most of them warn that defense in a boom and bust industry, where today's rhetoric is not necessarily tomorrow's contracts. "How much is enough" for national defense is a question presidents keep changing their minds about.

Take Jimmy Carter, for instance.

As a presidential candidate, he wrote this to the Democratic Platform Committee on June 10, 1976: "Without endangering the defense of our nation or our committments to our allies, we can reduce present defense expenditures by about $5 billion to $7 billion annually."

As recently as Sept. 14, Carter wrote Sen. Ernest F. Hollings (D-S.C.) that "as the result of other economies and improved coordination of our defense programs with those of our allies, we should be able to carry out our defense objectives without exceeding the 3 percent level of annual increase in 1981 or 1982".

But on Dec. 13, Carter's defense secretary, Harold Brown, said the president would ask Congress for "annual increases of about 4.85 percent a year after inflation" for the Pentagon budgets of fiscal 1981 through 1985.

Carter, who earlier in his term had said no to such costly military items as the B1 bomber and Nimitz nuclear aircraft carrier, was under pressure to raise the defense budget to win Senate votes for the strategic arms limitation treaty (SALT II) Ironically, he has now taken the further step of also asking that SALT be deferred, mainly because of the Soviet invasion of Afghanistan.

Events in Iran, meanwhile, which under the shah was a heavy purchaser of U.S. arms and is no longer, helped persuade the president of the need for his Rapid Deployment Force. Carter, who once pledged to limit arms sales abroad, is also proposing now to arm such new countries as Pakistan, and has agreed to let U.S. companies sell foreign buyers the FX.

The stock market has reacted excitedly to these turnabouts. Defense stocks have risen in recent days, even though the companies themselves are restrained as to their prospects.

James M. Beggs, vice president of General Dynamics for aerospace, reflected the cautious optimism of his industry as he discussed the FX fighter Carter has approved for sale abroad.

"I have to study what he really means, how many planes we would be allowed to sell and how freely," Beggs said.

All the same, neither General Dynamics nor any other contractor is going to pass up a glittering possibility like the FX. So, General Dynamics has designed an austere version of its F16 fighter, including a simpler engine, in hopes of selling it overseas under Carter's liberalization arms policy. Northrop, builder of the F5 fighter sold around the world, has a competing FX on the drawing board.

Even without such now business as FX fighter sales, General Dynamics is expected to remain a top contractor as the Pentagon orders the firm's existing weapons under Carter's higher defense budgets. General Dynamics builds the F16 fighter, missiles, nuclear submarines and is a finalist in the $3 billion air launched crusie missile competition.

In the longer term, Begg said, he c an see fresh millions going to General Dynamics if Carter follows through on his plan to organize a 100,000-man Rapid Deployment Force.

"This is the potential sleeper if the administration is really serious," said Beggs. The outfit would need a whole new arsenal of modern weapons, he reasoned, including the company's shoulder-fired Stinger antiaircraft missile and the DAVID antiaircraft gun General Dynamics hopes to sell the Army.

McDonnell Douglas, United Technologies and Lockheed all stand to make money on building aircraft to transport the Rapid Deployment Force. Force.

The Carter administration already has announced its intention to accelerate purchases of the McDonell Douglas KC10, a DC10 wide-bodied jet filled with tanks for aerial refueling. Tankers give military forces more reach.

United Technologies' Pratt & Whitey division hopes to sell engines for the new long-range CX cargo planes. Lockheed is designing the CX plane. t

Carter plans to spend about $6 billion on about 50 CX planes for the Rapid Deployment Force.

"We're optimistic," acknowledged Lockheed vice president Richard L. Cook in discussing his company's chances of winning the CX contract.

"But such initiatives frequently don't materialize," Cook cautioned. "I don't think it's a sure thing yet. If I sound cautious, I am. We've been through a rough period."

Lockheed in 1971 obtained government guarantees of loans the firm said it needed to avoid bankruptcy.

"We're cautiously optimistic," said J. Harry Goldie, executive vice president of Boeing's aerospace division, in appraising his company's future with the military in light of Carter's new defense policies. He said Boeing would make "a real play" for the CX contract.

"The current upset with the Soviets is definitely a favorable trend for the MX missile," added Goldie. Boeing is building the giant truck for carting the MX missile around a race-truck pattern of shelters.

Similarly, reasoned Goldie, sales of the Ronald antiaircraft missile Boeing is building with Hughes "are difinitely going to get stimulated by the recent tensions."

The "new" Carter and these tensions promise to change the current 75-25 split in Boeing's commercial-defense business, Goldie said. The Pentagon is scheduled in March to declare either Boeing or General Dynamics winner of the air launched cruise missile competition.

As for Carter's revised shipbuilding plan -- 95 rather than 67 ships over the next five years -- shipyard executives see this as a help, but not a cure for their ailing industry.

"All that will do is enable yards to avoid disaster," said Leonard Erb, president of Litton's Ingalls shipyard in Pascagoula, Miss. "The shipbuilding business was headed for disaster."

Longer term prospects for Ingalls and other yards do look brighter if the new shipbuilding plan -- there is a new one every year -- holds. The impact of the Carter plan "is three to five years away," said Erb.

Carter's new stands on defense and detente apparently triggered the recent upsurge in buying defense stocks. But no one knows how deep this investor interest is.

Said Larry Wachtel, New York analysts for Bache, Halsey, Stuart and Shields: "We're caught in a psycological frenzy. Afghanistan put it in sharp relief that Carter is no longer the reluctant warrior. The attitude became, 'If it's in defense, I'll buy it.' Often there is no logic to it."

Wachtel predicted the buying of defense stocks would become more selective in the future.

Another dampener for those expecting boom is the hard fact that only about one-fourth of the Pentagon budget goes to procurement, the account reflecting orders for the highly profitable production runs of weapons. Of the $135 billion Carter originally requested for fiscal 1980 for national defense, only $35 billion was earmarked for procurement.

Still another reality is that each of today's superweapons cost so much -- $2 billion for a Nimitz nuclear aircraft carrier and up to $25 million for one fighter plane -- that the big chunks of procurement money are concentrated in a relatively few companies rather than spread across the industry, as was the case during World War II.

Finally, it takes so long to get weapons from the drawing board to the production line -- up to 10 years -- that world conditions could improve in the meantime to negate the need for the higher defense spending Carter now advocates.