Above is a wiring diagram for a standard, 3-way lamp switch. This socket is used with a three way bulb containing 2 separate elements that are energized separately and then together as the switch knob is turned, for varying degrees of light.
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.
New 2-wire cable is run from the receptacle to the new light fixture. At the receptacle the wires are removed and each one is spliced to the new cable and back to the receptacle with a pigtail splice. At the light fixture box the black wire connects to the hot terminal, the white connects to the neutral terminal and the ground to any metal grounding terminal on the fixture, outlet box, or both.
This is an updated diagram for the same circuit. Here the source neutral, known as a grounded neutral, is run through to the switch box where it can be used to power switches that require a neutral connection. A neutral connection like this is now required in most new switch boxes as of the code changes in 2011.