In the past, you might have a smoke detector on every floor outside of a bedroom. Now you see a separate smoke detector in each bedroom. Should there also be a detector outside of the bedrooms? What about in or near the kitchen, garage, and utility rooms? How close should the smoke detector be placed to adjacent walls?
According to the guide handed out by my local permitting office, which doesn't cite electrical or fire codes but does detail what they look for:
A smoke detector should be placed inside the door of each bedroom 24 inches from the nearest walls or centered on the doorway 24 inches from the wall holding the door.
A combination smoke alarm / carbon monoxide detector should be placed in any hallway that leads to bedrooms, where it enters the main part of the house, again, centered in the hallway on the ceiling and 24 inches from where the hallway connects to the rest of the house.
All of the smoke detectors should be hardwired to a circuit on the house's mains and should talk to one another via a third wire.
The rules are a little different for single family dwellings and apts etc. You can check the NFPA online for latest updates. Little short of time to research it right now, but for single family, the rule of thumb is one smoke detector on each floor. the top of staircases is a good location. At least one of which should be a smoke/CO detector. CO detectors should be in the living level or vicinity of any CO producing appliances. New construction has it's own set of rules for hard wired systems. Explosive gas detectors should be installed close to the floor close to any gas fired appliances, one for each level where gas outlets are present. Hopefully, one of our contributors can reference the sections of NFPA that apply.