Black power advocate Stokely Carmichael dropped by the District Building yesterday to visit his friend and assoication of a decade ago, D.C. Mayor Marion Barry.

"My leader!" A grinning Barry joked, coming into his office and throwing his arms around Carmichael.

They shook hands, posed for pictures and joked about the old days of demonstrating in front of segregated Washington department stores with the late Julius Hobson.

Then Carmichael noticed on Barry's lapel, the "Muntu" pin -- a goldplated silhouette of Africa with an outline of the United States inside. It is a pin worn by many black Americans to symbolize their African roots, and Carmichael, an avowed Pan-Africams, had noticed Barry wearing the pin in photographs of the mayor's recent meeting with President Carter at the White House.

When he saw it yesterday, Carmichael said afterward, he told Barry, "Right on! Hold up the flag."

"I wear it all the time," Barry responded.

Carmichael, who once stood as a national symbol of radical and violent black protest, described his brief visit to the city's new chief executive yesterday as a courtesy call to wish good luck to Barry.

In 1960, when Carmichael and others organized the Student Nonviolent Coordinating Committee (SNCC) in Raleigh, N.C., Barry was chosen as its first national chairman. In 1966, Carmichael became national chairman of SNCC and used his position to popularize the concept of black power.

In recent years, Carmichael has lived in Conakry, the capital of the socialist country of Guinea in West Africa. He returns frequently to the United States to speak on college campuses.

His new name, Carmichael says, is Kwame Toure, given to him by Guinea's president, Sekou Tourse, and bestowed in honor of the late Kwame Nkrumah, president of Ghana, Nkrumah's African-oriented socialist ideology has been adopted by Carmichael.

Carmichael is now an organizer for a group called the All-African Peoples Revolutionary Party. And Marion Barry, with the help of a handful of other SNCC veterans, is running the local government in the nation's capital.

Barry has explained his own involvement in elective politics during the last eight years as a pursuit of the same goals in a different way. When pressed yesterday on whter the election of former activist Barry as major of a large, predominantly black major American city was in fact the arrival of black power, Carmichael would offer only an indirect response.

"In order to get black power, the people have to be organized. They must be organized," he said, in assertive, doctrinatire fashion. "They are a long way from being organized."

Carmichael, who still says with a smile that "my religion is revolution," says Africa is progressing "well" toward black power. But in America, he said, there are indications that the country is returning to styles and thinking of the 1950s. He noted the popularity of television shows such as "Happy Days" and the fact tht fewer and fewer blacks are now wearing natural hair styles.

But there have been some changes.

When a reporter asked Barry whether he thought Carmichael would have been a welcomed visitor in the office of the mayor of the District of Columbia 10 years ago, Barry replied:

"Ten years ago, Stokely probably would not have wanted to see the mayor."