I am using an op amp (741). I need to supply its pin 4 with -5 volts using a power supply unit from a computer or from a simple battery. How am I going to do that?
The best thing to do with an LM741 in most cases is to replace it with a more modern single supply opamp.
An LM358 dual or LM324 quad is about as good, usually cheap and available.
This page from a project by some one at the CIT in CEBU suggests 100 PHP each which is far too dear. Digikey has them for about 20 PHP in 1's prices here and about 13 PHP each in 25's - and you get 4 amplifiers per package.
datasheet here for LM324. Single supply from as little as 3V (5V ir more is a lot better).
If you want to use an LM741 you can use a negative voltage that is greater (more negative) than -5V without affecting the results in almost all cases.
To start, obtain a 9V transistor battery or a 4 or more cell AA alkaline battery pack or other source of 5V or more. Or a mains "plugpack" power supply of 5V or more.
Connect the +ve terminal of the supply or battery to ground and the -ve terminal will be at -V. eg a 9V battery will give -9V etc.
First you should be asking yourself if you really need a negative voltage.
Most things you can do with a 741 can be done using a virtual ground - a voltage divider between Vcc and ground to give a voltage at 50% of Vcc - this is then used as the ground reference, Vcc becomes Vcc/2 and ground becomes -Vcc/2.
Failing that, with batteries you can just have a chain of batteries in series, and take a mid-point tap to be your ground.
For a more complex and high-tech solution you could use a Charge-Pump Voltage Inverter.
These are available in chip form, and most will give the input voltage out in negative form (so feed in +5v and you get -5v out).
One good example is the MAX764/5/6 chips. They take a minimum of external components (1 inductor, 2 capacitors and a diode) to give enough power to run an op-amp.
First, you should have a voltage suitable with your batteries set up, as Russell said, then, there are several ways to obtain negative voltage referance for your OP-AMP.
In one episode of EEVblog, Dave tells 3 options and compares them for a spesific application. Here is the episode where Dave designs a negative voltage referance generator for uCurrent project EEVblog #72 - Let's Design a Product @ 21:27
You can get -12VDC from an ATX computer power supply. It is the blue wire from pin 14 of the main motherboard 20/24 pin connector. Most op amps can handle -12 Volts with no problem.
Here's another solution like Mr. Majenko. He suggested to use two same valued resistors for this purpose. But if we use a transformer then rectify it and then filter to get dc. If you use such process to get dc from main household ac supply, here's a problem. Very often the voltage supplied by main can get down or high and hence the dc will also get down or high. thus you may not get exact valued Vcc and -Vcc. To avoid this problem you can use two zener diodes instead of the resistors. The zener should be valued compatible to your need and voltage u supplied.
To understand it first check out the solution given by Manjeko atop my answer.