After visiting Israel's haunting memorial to 6 million Jewish victims of the Holocaust, President Carter told his hosts today he is conscious of the slaughter's implications for Israel's deeply felt security needs.

Accompanied by Prime Minister Menachem Begin and war crimes prosecutor Godeon Hausner, himself a survivor of a Nazi death camp, the president toured Yad Vashem, the Holocaust memorial, and emotionally vowed that the world will not again witness "this horrible episode in the history of humankind."

"We are strongly resolved this shall never happen agin," echoed Hausner, who was chief prosecutor in the trial of Adolf Eichmann. Carter replied, "I have the same resolve."

At Mount Herzl, the next stop of a frenetic day in which Carter fitted in 6 1/2 hours of negotiating with Begin and other Israeli leaders, the president paid homage to Thedore Herzl, the founder of world Zionism, and penned into a guest book, "May these memories never die."

Then, in an unscheduled stop, he visited the grave of Zeev Jabotinsky, founder of the revisionist movement and Begin's political mentor.

During the day, Carter also visited with Israeli President Yitzhak Novon and attended services at St. Andrew's Scots Memorial Church here, before beginning the grueling round of negotiations that lasted until after nightfall.

But the most moving episode of the day, by appearances, came at Yad Vashem, where almost all visiting dignitaries are taken by their Israeli hosts on official visits. Walking hand-in-hand with his wife Rosalynn along the treelined "Avenue of the Just," a memorial to gentiles who helped Jews escape from Nazi persecutors, Carter first visited the "Hall of Names," where records of all known victims of the Holocaust are maintained.

As Carter flipped through the pages of the record books, Begin explained to him that there are many names from the European countries, but few from the Soviet Union. "They just threw them [the victims] into pits," Begin said.

Carter turned to the prime minister and asked, "are you still discovering names?" Begin replied, "Every day, all over the world."

From there, the president visited the "Remembrance Hall," a windowless structure made from enormous hewn basalt boulders surrounding a striking simple black mosasic floor into which are carved the names of the 20 principal Nazi extermination camps -- including familiar names such as Auschwitz, Dachau, Treblinka and Buchenwald. As Carter, wearing a blue skullcap, watched somberly, a choir of young Israeli girls sang in Hebrew, "Out of the depths have I cried unto thee, O Lord. My Lord, hear my voice."

After a cantor sang, "Let the Lord remember the souls of our brethren, the children of Israel, victims and heroes of the Holocaust..;" Eitan BarHon, a Yad Vashem protocol officer, read the commemoration:

"As we rekindle the eternal light in this hall of remembrances before the sacred remains of our martyrs, we unite with the blessed memory of six million of our people who died a martyr's death at the hands of the Nazis and their collaborators..."

Carter then rekindled the flame and laid a wreath on the tomb of the martyrs' ashes directly in front of the eternal flame.

The president and first lady appered moved as a prayer was read from Ezekiel 37 -- "Then he said unto me, son of man, these bones are the whole house of Israel" -- and the choir sang another prayer.

After putting the wreath down, Carter stood for about 30 seconds with his eyes closed.

Just before Carter left the King David Hotel last night to drive to the Knesset, an advance car of his motorcade was pelted with stones and eggs apparently thrown by ultranationalists lining part of the route, White House officials said.

The demonstrators apparently mistook a limousine that preceded Carter's car by two minutes for the presidential vehicle and stoned it before they were subdued by Israeli soldiers.