A federal district judge in Baltimore sentenced two 12-year-old District of Columbia boys yesterday to be confined for a period not to exceed their 21st birthdays for slaying a 7-year-old whose bicycle they tried to steal.

Judge John R. Hargrove announced his decision during closed proceedings. Linda Spevack, an attorney for one of the boys, said no definite plans had been made for placing the children, who will be in the custody of the Federal Bureau of Prisons. The boys are now housed at an adult facility in Northern Virginia.

Last Easter the 12-year-olds, whose identities were withheld because they are juveniles, lured Carl Ellis Arthur, 7, of Livingstone Road SE from a playground in front of his home to the Oxon Hill Children's Farm, where they attempted to steal Arthur's bicycle. They hit the smaller child with a club, pushed him into the Potomac River and stoned him until he stepped into deeper water and drowned.

Since the crime occurred on federal property, the case was transferred to federal court. Hargrove heard the case last month and found the 12-year-olds guilty of second-degree murder, robbery, attempted robbery and assault with a deadly weapon.

According to Spevack and the other defense attorney, Elvira White, both boys have a history of behavioral problems. Spevack said that during yesterday's hearing the judge took their parents to task for not providing sufficient guidance to their children. "He did not mince words," Spevack said.