The military leaders of Israel and Egypt today opened direct negotiations on conditions for Israeli withdrawal from the Sinai peninsula and its return to Egyptian control.

With all ranking military men of the two nations in attendance, the talks got underway with both sides expressing the hope that peace can be attained.

Before the session began, however, Israeli Defense Minister Ezer Weizman held a 50-minute conversation with Egyptian President Anwar Sadat, presumably to discuss the thorny issue of Jewish settlements in the Sinai and Sadat's demands for a complete withdrawal of all Israelis, civilian and military.

Weizman was taken directly from Cairo airport upon his arrival this morning to the Egyptian President's retreat at Aswan. No details of their meeting were disclosed but it was learned that it took place at Sadat's initiative, something the Israelis interpreted as a hopeful sign.

The military talks here are a direct result of the recent summit diplomacy by Sadat and Israeli Prime Minister Menahem Begin. They are to be accompanied by political talks that will get underway next week in Jerusalem involving the foreign ministers of Egypt and Israel and U.S. Secretary of State Cyrus Vance.

A United Nations representative also was to have attended the Jerusalem talks on the political aspects of a Middle East settlement. But it was announced today that the United Nation has backed out of the Jerusalem meeting.

Egypt is most anxious to avoid any appearance of negotiating a bilateral peace with Israel that would leave other Arabsout in the cold, but the military talks that got under way here today may provide ammunition for Sadat's critics.

Although both the Egyptians and Israelis voiced optimism, it was immediately apparent that major differences remain in their views. Any illusions that either side may have had about quickly overcoming 30 years of hostility and suspicion were dispelled by the stark reality of the Christmas summit as Ismailia when Sadat and Begin could not reach a joint statement of principles that would form the basis for negotiations.

But the two leaders agreed to continue the peace talks through joint political and military committees, the first session of which began today.

The military committee is not going to address peace terms between Israel and any of its other Arab neighbors - or the future status of Palestinians. Rather, the military men will focus on the Sinai defense issue "the way we see it and the way they see it," Weizman said before his departure from Israel this morning.

Political problems, which are probably going to be more difficult to resolve than the terms of a Sinai accord, will be dealt with at the parallel talks in Jerusalem.

Upon arrival here, Weizman said, "We are charged with a most difficult mission. We are entering into deliberations which are not facile. We shall be faced with difficult hours and perhaps moments of crisis. However, we shall not slacken our efforts. We must forge a new reality between two nations who have known bitter struggle and who have borne the brunt of bloody conflict."

While both the military and political talks are integral parts of the Cairo conference that was convened in December, the military committee will discuss only bilateral issues between Egypt and Israel.

That is why neither the United States not the United Nations, which both attended the opening of the Cairo conference last month, nor any other party had been invited to attend the military committee meetings.

In the first session of the military talks tonight, which lasted about 90 minutes, the two sides outlined their positions but did not begin formal dicussions of them, according to spokesmen for the Israelis and the Egyptians.

The meetings resume Thursday and there is no official word on how long they will continue, though a weekend break is expected.

As was predictable, the opening positions reflected the very different views of the two sides of what the negotiations are about and how they should proceed. The Israelis emphasized the need for guarantees of recognition and security, and the Egyptians pressed for Israeli withdrawal from territories occupied in the 1967 war.

According to the Egyptian spokesman, Egyptian War Minister Gen. Mohammed Ghani Gamassy spoke of his hope that the talks would lead to "complete Israeli withdrawal" from Sinai. It was made clear that he was talking not just of Israeli troops, but of all Israelis including those who have settled in the communities west of the Gaza Strip.

Weizman gave this outline of the issues to be discussed: "We shall examine arrangements for the continued maintenance of the Israeli settlements of the border regions and means of securing them. We shall discuss the establishment of free and open water-ways to all bodies of water which border our nations. We shall discuss the reduction of our military forces and the establishment of a wide demilitarized zone in the Sinai peninsula so as to enable advance warning and effective control over the implementation of the agreement between us."

He also said that "above all we must guarantee open boundaries" - another reflection of how the Israelis want to talk about their acceptance as a state and the security of their people while the Egyptians believe that those things can only follow an Israeli commitment to give up the territories and to regognize the rights of the Palestinians.

The Israelis are "proposing a peace settlement contrived between two free nations, two nations weary of war," Weizman added.This formulation also holds little appeal for the Egyptians, who are hoping to get something for Jordan and the Palestianians as well as for themselves.

The two delegations, all in civilian clothes, met across a long table topped with green felt in the former palace of the women of Egypt's royal family. Known as Tahera Palace, it is a 19th century relic of brick, granite and ornate interiors inside a walled garden. It has been used in recent years to house visiting digniatries below the rank of head of state.

Besides Weizman, the Israeli team includes Deputy Defense Minister Mordechai Zippori; Lt. Gen. Mordechai Gur, the chief of staff; Maj. Gen. Shlomo Gazit, the thead of military intelligence; and Maj. Gen. Avraham Tamir, who was a delegate to the preparatory peace talks here last month.

On the Egyptian side, besides Gamassi, are Lt. Gen. Mohammed Ali Fahmi, the chief of staff; Gen. Hassan El Greidli, chief of operations; Gen. Mohammed Hussein Shawkat, director of intelligence; and Gen. Taha Magdoub, who was Gen. Tamir's counterpart at the preparatory talks.

The question of whether the Israeli settlements in the Sinai were to be discussed here or in the political committee's meetings next week in Jerusalem was an important one for the Egyptians.

In the joint press conference he held with Begin after the Ismailia summit, Sadat said they were in agreement on the future of the Sinai and the Sinai was "a side issue" to the real dispute, over the future of the West Bank. The egyptians were surprised and angered when it turned out that their views on the Sinai and those of the Israelis were actually quite different.

The Egyptians argued that it is the function of the military committee to discuss the details of Israel's withdrawal from the Sinai, preferably in no more than a year - not the question of whether this withdrawal is to take place. That, the Egyptians say, is a given. Since the withdrawal included the Jewish settlements, the Egyptians believed it, was a matter for the military committee.

The Israelis, by insisting on taking this up in the political committee, appeared to be arguing that the principle of dismantling the settlements was negotiable - which Sadat says it is not.

By agreeing to discuss it in the military committee, however, the Israelis are not subscribing to the Egyptian view that either the settlements must go or their occupants must become Egyptians.

Sources on both sides say they are anxious that the talks not fall quickly into a deadlock. Therefore, teh settlements issue, if it cannot be resolved promptly, may be deferred in the hope of making progress on other matters.

The prevailing view among informed Egyptians is that the Israelis would like to keep the settlements in the Sinai, but are prepared to give them if they have to.By making such a fuss over them at this point, the Egyptians think, the Israelis hope to reduce the pressure for movement on the West Bank and to look good if theyfinally yield on the Sinai.