The judge who will sentence D.C. Mayor Marion Barry for drug possession could base that sentence in part on the 12 criminal counts against Barry that ended in a hung jury, according to sentencing experts.

Under new federal sentencing guidelines, U.S. District Judge Thomas Penfield Jackson has a range of options in sentencing the mayor, from probation to six months in prison.

But if Jackson is inclined to consider the 12 charges on which the jury could not reach a verdict, he could revise that sentence upward to the maximum sentence federal law allows for misdemeanors: one year.

The reason: The philosophy behind the sentencing guidelines allows judges to consider the whole range of a defendant's conduct, not just the precise act on which the conviction was based. Moreover, the guidelines say that judges can base the sentencing decision on evidence that would not be admissible in a criminal trial, and need not be convinced of the evidence beyond a reasonable doubt.

These little-known options are part of a radical, ongoing restructuring of federal court sentencing policy that began with an act of Congress in 1984. The law set up a sentencing commission that since then has drawn up formulas for developing sentences for every federal crime.

In an interview yesterday on WOL-AM radio, Barry's attorney, R. Kenneth Mundy, said that he would be "shocked" if Barry received a prison sentence. "Thirty days, that would be what I would expect, at some type of release center," Mundy said.

In any case, it is likely that Barry will have to submit to periodic drug tests. That is standard procedure at the U.S. Probation Office here for any defendant convicted of a drug charge.

Another standard procedure is to refer drug defendants to a drug counseling program, said a source in the Probation Office, although that requirement might be waived for Barry if preliminary urine tests show he is drug-free. A federal magistrate required Barry to submit to weekly drug tests after his Jan. 18 arrest at the Vista Hotel, but that requirement was dropped by Jackson when Barry first appeared before him.

The sentencing guidelines are based on the concept of "real offense" sentencing -- the idea that judges should be allowed to sentence defendants based on a total picture of their conduct, rather than narrow legal grounds. U.S. Attorney Jay B. Stephens alluded to that concept Friday on the courthouse steps moments after the Barry jury returned its verdict.

"As prosecutors we . . . will seek input into that {sentencing} decision . . . . A court may take into account the full range of criminal conduct when imposing sentence on any conviction."

Jackson has set a Sept. 17 hearing to discuss whether prosecutors want to ask for a retrial on the 12 deadlocked charges. Stephens has not said what he will do. Jackson has not set a sentencing date. Barry was acquitted on another possession charge.

If the judge takes into account conduct for which the jury did not convict Barry, he could consider nine other misdemeanor cocaine possession counts and three felony counts of perjury. Also, in his pre-sentencing memorandum, Stephens can urge Jackson to take into account other alleged crimes for which Barry was not indicted.

"The judge could do that if he were so inclined," said Georgetown University Law Center professor Paul Rothstein. But, he added, "I would personally say that against this political and racially charged background, that would be an explosive thing to do."

Other experts say there is no legal precedent for Jackson to consider anything but the count of which Barry was convicted.

"It would seem to me that the judge would not be able to give any weight to charges for which there was a mistrial," said Mario Conte, chief trial attorney for the Federal Defenders of San Diego, which puts out a newsletter on developments in the guidelines.

"There's no verdict, no guilty plea," Conte said of the 12 deadlocked counts. "Absent a finding of guilty or not guilty, a court just can't consider it."

Just what the judge may consider under the new guidelines is in dispute, said Yale Law School professor Daniel J. Freed, editor of another sentencing publication.

"The 'real offense' is one that's been litigated," he said. "The question is, to what extent may a sentencing judge take account of conduct other than that of which the person was convicted?"

Ironically, the guidelines formula also says Barry's sentence would have varied little if he had been convicted of many cocaine possession counts, because the formula calls for similar charges to "telescope" into one overall count, said Rothstein.

Although it is legally possible for Jackson to give Barry jail time, it is unlikely, for several reasons. First, Jackson did not send former White House aide Michael Deaver to prison in 1987 for perjury, a more serious crime.

Second, if the judge does decide to sentence Barry to more than six months in prison, he would be bucking a strong national trend, said 4th U.S. Circuit Court of Appeals Judge William W. Wilkins Jr., head of the U.S. Sentencing Commission.

According to figures collected by the commission, he said, federal judges are imposing stricter sentences than the guidelines call for only 4 percent of the time.