A doorbell circuit for two or more doors will have a separate contact on the chimes for each button included. At the chimes, one wire from each button is spliced to the output wire on the transformer. The second wire is connected to one of the contact screws on the chimes.
The plain wire is the hot. If the cord isn’t marked with a bead then the strands of wire will be different colors. In these cases the silver wire is the neutral and the brass colored wire is the hot. The plug on the lamp cord holds another clue to polarity with the wide prong being the neutral and the narrow one the hot. Older lamp cord will have prongs that are the same size. This is because polarity was not observed on electric lamps until the development of grounded circuits.
A hardwired doorbell includes a small transformer that converts the household alternating current (AC), to direct current (DC) for the doorbell chimes. A small, 16 awg wire runs from the door button to the chimes. When pressed, the button will send the transformer output through the chimes, sounding the bell until it is released.
This wiring diagram illustrates wiring a light switch to control an existing receptacle outlet. The source is at the receptacle and a switch loop is added to a new switch. The hot source wire is removed from the receptacle and spliced to the red wire running to the switch. The black wire to the switch connects to the hot on the receptacle.