BOCA requires in R2 and R3 type buildings to have a smoke detectors installed in

1)Each bedroom
2)Adjacent to the bedrooms
3)One on each floor

Additional requirements for split levels and such are included.

The SD's are required to be 120 volt, interconnected and battery-backup.

Additionally, our fire battallion chief said adjacent means no more than ten feet outside the door. Also, SD's cannot be installed within 3 feet of the edge of ceiling fan blades and/or any vents(supply or return)