The U.S. Court of Appeals gave the go-ahead yesterday to President Carter's crackdown on Iranian students in the United States and overruled a lower court decision that had prohibited the government from deporting any of the students.

The appeals court decision held that the crackdown, ordered by President Carter on Nov. 10, was a legitimate exercise of the president's constitutional power to conduct foreign affairs without interference from the courts.

"The present controversy involving Iranian students in the United States lies in the field of our country's foreign affairs and implicates matters over which the president has direct constitutional authority," the three-judge appeals court panel said.

"...It is not the business of courts to pass judgement on the decisions of the president in the field of foreign policy. Judges are not expert in that field and they lack the information necessary for the formation of an opinion.

"The president on the other hand, has the opportunity of knowing the conditions which prevail in foreign countries, he has his confidential sources of information and his agents in the form of diplomatic, consular and other officials," the panel said.

The immediate impact of yesterday's ruling was not expected to be extensive. Although the appeals court had prohibited the Immigration and Naturalization Service from ordering any deportations of Iranian students found to be in the United States illegally, it had permitted the agency to continue gathering information about the students.

Attorneys for the Iranian students said yesterday they will request a hearing today by the full Court of Appeals and may take the case to the Supreme Court.

U.S. Justice Department officials said yesterday that 54,486 Iranian students have reported to immigration officials so far and 6,444 were found to be in violation of their visas and were candidates for deportation.

In addition, 823 Iranian students have been permitted to leave the United States voluntarily, 47 have applied for asylum and 10 were deported before the original prohibition by U.S. District Court Judge Joyce Hens Green on Dec. 11.

At a press conference after yesterday's court decision, Attorney General Benjamin Civiletti adopted a moderate tone, saying that the examination of Iranian students would continue "with the hearings and with the due process requirements which apply (and) to which all Iranian students . . . have a right."

Civiletti said he could not speculate on how many students will eventually be deported, but he said that 500 to 1,000 will probably leave the country during the next few months.

He said most of these would be voluntary departures. Most of the students who have been found to be here illegally, he said, would remain here because:

A "substantial number" have sought political asylum.

Others can cite "humanitarian goals which would justify" their remaining, such as completing school or being married to a legal Iranian resident here.

Others are "illegal" only in the sense of small technical violations, such as changing from one college to another and failing to register this fact. s

INS Officials said yesterday they were not sure what they would do next.

"We haven't made any plans beyond the ruling," one official said. "we don't know what the next step will be."

Judge George E. MacKinnon, Roger Robb and Edward A. Tamm, who composed the appellate panel, said they found no basis for Judge Green's conclusion that the immigration agency's reporting requirements for Iranian students were unconstitutional.

"Distinctions on the basis of nationality may be drawn in the immigration field by the Congress or the executive," the judges said, "So long as such distinctions are not wholly irrational, they must be sustained."

The court said that the president's decision to deport Iranians found to be in the United States illegaly "was a fundamental element of the president's effort to resolve the Iranian crisis and to maintain the safety of the American hostages in Tehran."

The appellate judges said that the lower court "went beyond an acceptable judicial role" when it declared the president's crackdown on Iranian students unconstitutional.

In a concurring opinion, MacKinnon wrote that Iranians have been singled out because "the government of their home country has committed, and is committing, a number of violent, lawless acts against the United States and its citizens."

"The status of Iranian aliens cannot be disassociated from their connection with their mother country. . . ," MacKinno wrote. He said "the connection with the home country" also means the United States has the power to terminate the alien's stay in this country.

Lawyers for the Socialist Workers Party and the American Civil Liverties Union, who filed two lawsuits challenging the regulations, said yesterday they will request a new hearing on the case before the full U.S. Court of Appeals.

"The court of appeals decision violates the rights of 50,000 Iranian students," attorney Shelley Davis said yesterday. "President Carter's decision to round up the Iranian students because of their political beliefs and nationality. . . threatens the democratic rights of all Americans."

Ralph Temple, legal director of the local affiliate of the ACLU, called the court's decision a "very poor and disappointing ruling which signals a breakdown in our moral values."

"Here we are ripping a hole in our own Constitution to show the Ayatollah that we can be as ruthless as he." Temple said. "We're mad as hell and this is our way of getting a quick fix."

After Judge Green's Dec. 11 ruling, the INS immediately curtailed its interviews of the students on campuses across the country, including such Washington-area campuses as George Washington University, American University and the University of Maryland.

Three days later, the U.S. Court of Appeals gave the Carter administration permission to continue searching for Iranians who are here illegally -- so long as none were deported pending yesterday's court review.

President Carter asked Attorney General Civiletti on Nov. 10 to identify all Iranian students in the United States who were not in compliance with their visas. Three days later, Civiletti issued regulation setting up the interviewing and registration procedures.

Since then, 54,486 Iranians have been interviewed and 45,678 have been found to be in compliance with their visas, a Justice Department spokesman said yesterday. "About 90 percent of those interviewed were found to be here for the purpose that was intended -- study," said a Justice Department statement issued yesterday.

The INS Washington District office has found 88 of the 1,807 Iranians its agents have interviewed in the Washington-Virginia area to have violated their status.

"We have asked them to get ready to leave," said District Director Kellogg Whittick. Visa violators have been given a choice -- voluntary deportation or deportation hearings, he said.

Whittick said that no one has been ordered to leave since Judge Green's ruling and that he will not know how many of the 88 have actually left until he receives the arrival-departure slips aliens are required to file with the INS upon departure.

"The INS will proceed with the process," the Justice Department statement said yesterday. "The attorney general wishes to remind those Iranians here on student visas who have not yet reported that they have until Dec. 31 to report. He urges them to do so."