A few months ago when a high-ranking Italian Communist was on a brief visit to the United States, he stopped in a toy store and as a joke bought a $1.90 tin sheriff's badge for a political colleague, the Christian Democratic interior minister who heads Italy's police.

The incident, small as it was, was just one more indication of Italy's increasingly bipartisan political system, under which government has been impossible in recent years without substantial agreement between the Christian Democrats and the Communists - two parties that were once sworn enemies.

In effect, a Christian Democratic-Communist alliance, which the Communists call "the historic compromise," already exists. Substantial cooperation between the two parties has gone on for years in Parliament and has been growing rapidly at the local level as well.

Christian Democratic-Communist teamwork here in the capital, however, has increased dramatically since last summer, when Communist abstention on a vote of confidence proved necessary for the formation, and the continued survival of the current minority Christian Democratic government.

This does not mean that there are frequent direct contacts between Communist Party Secretary Enrico Berlinguer and his Christian Democratic counterpart, Benigno Zaccgnini. But inside sources in both parties say that the two leaders' lieutenants speak regularly and that top aides of Premier Giulio Andreotti keep in close touch with ranking Communists.

In addition to talks over the past four months, in which the Christian Democrats and the Communists have been seeking agreement to increased police powers, educational reform, local government and economic policy, the Communists are now regularly consulted on all important government matters.

Thus, when Interior Minister Francesco Cossigna decided in March to send armored vehicles into Bologna to quell student riots there, he first consulted Ugo Pecchioli, the Communists' "shadow minister" for police and military affairs.

Fernando Di Giulio, a ranking Communist deputy, claims that it takes him no more than three minutes to get any Cabinet minister on the phone. The Communist Party's top ecomonic expert, Lucinno Barca, recently told two American visitors that he frequently gets calls from high-ranking bureaucrats and government officials.

"What they usually ask is 'What would you fellows do if we were to do such and such,'" Barca explained. "But," he added, "these contacts have been going on for quite some time."

Calogero Pumilia, vice president of the Christian Democratic deputies, agrees, saying, "Negotiation with the Communists is not new, but has now become obligatory." In national elections a year ago, the Communists, with 34.5 per cent of the vote, ran only four points behind the Christian Democrats while almost all Italy's smaller parties lost ground.

"The government needs us," says Di Giulio, Pumilia's Communist counterpart in the Chamber of Deputies. "Andreotti's majority is a negative one, and he is well aware that if we vote 'no' on an important bill his government would probably collapse."

Di Giulio points out that since last summer all legislation has been "the fruit of a Communist-Christian Democrat understanding" so solid that clashes over two touchy issues, abortion and the judicial fate of a Christian Democratic former premier implicated in the Lockheed scandal, had no effect on the Andreotti government's fragile stability. "They are so much in agreement that they can agree to disagree," said a parliamentary official.

The Communists and Christian Democrats have always been the two biggest parties in the Parliament, and between them they occupy the top posts in the Chamber of Deputies and the Senate and control most of the major committees. Members of Parliament from both parties eat in the same restaurants, travel to Rome on the same trains and planes, and use the familiar form of address when speaking to one another.

"The days in which Christian Democrats and Communists cold-shouldered one another in the Parliament lounge and met secretly if discussion was necessary have been left far, far behind," says Pumilia.

Indeed, studies of the bills passed by Italy's legislative committees, which have the power to make three-quarters of this country's laws, show that even in the early 1960s, 90 per cent were passed unanimously or without organized opposition.

At that time, however, the Communists, who labeled themselves an opposition party, generally voted "no" on bills for which full public debate was required. Increasingly, they began to use abstention or sophisticated procedural methods to allow bills presented by the center-left governments that ruled Italy from 1963 through last spring to pass without actually voting for them.

In return, the Christian Democrats accepted Communist amendments to their bills and worked closley with their one-time enemies to pain stakingly reach agreements in committee and in the bimonthly meeting of party whips, where Christian Democrat-Communist accord on the parliamentary calendar is decisive.

Given the Communists' interest in an alliance with this country's Catholic masses, it is not surprising that by the 1972-1976 legislative session they were quietly voting "yes" on most bills and speaking of themselves as a government party.

But, says Pumilia, the change reflects more than just a Christian Democratic need. "At a certain point the Communists stopped talking about revolution and said they wanted to work within the system. Whether they are sincere or not is beside the point. The fact is they are willing to negotiate, and on laws that will hardly turn Italy into a socialist, non-Democrat state."