All homes should be protected by smoke detectors. It is not as important whether a specific code requires it as much as it is singly best thing you can do to protect you and yours from the threat of fire.
In compliance with current code, smoke detectors should be installed in:
Hallways leading to bedrooms
Basements with sleeping rooms
Ceilings more than 24" higher than connecting bedrooms or hallways leading to bedrooms
Stairway landings leading to upper floor bedrooms
Smoke detectors are mounted either on ceilings or on a wall where the entire detector is not more than 12" below the ceiling.
Battery Operated Smoke Detectors
Battery operated smoke detectors are acceptable for homes or areas where building-wired detectors were not installed. Smoke detectors that are powered by the building wiring shall also have a battery backup.