The National Electrical Code, which sets the minimum safety standards for the electrical system in your home, requires that each smoke detector in your home be hard-wired into your electrical system, have battery back-up, in case your power goes out, and interconnect with your other smoke detectors. If one goes off, they all go off. A smoke detector is required in each bedroom, one is required in the immediate vicinity of hallways outside of bedroom areas. One additional smoke detector is required on each story of the dwelling. A C.O. detector is also required to be installed in the immediate vicinity of bedroom doors if you have natural gas appliances, propane appliances, or an attached garage.