Install smoke alarms on the ceilings, at least 4 inches from any wall and well away from windows and HVAC vents. You should have one:
in every bedroom
outside each sleeping area
on every finished level of the house, plus the basement.
Carbon monoxide detectors need not mount on the ceiling. They can go anywhere in a space, including at receptacles (plug-in units save the effort of replacing batteries every six months). Put one on each level of the house, including the basement but not the attic. For both types of detector, write the install date on the inside of the cover with permanent marker. That way, you'll know when 10 years is up on your smoke detectors and it's time to replace them because the sensors are no longer reliable. With carbon monoxide detectors, follow the manufacturer's guidelines for how often they should be replaced.