Hi,
Usually they are used at the input stage. They can be needed in the output stage when the device can not both sink and source current. eg In SG3524, it can either sink or source current, but can not do both, so you need to connect pull-ups or pull-downs at the output.
But usually, they are used at the input stage. Let's take an example. Say you have a microcontroller pin connected to a switch which is in turn connected to +5V. When the switch is closed, the pin receives +5v. However if the switch is open, the switch receives no input, it's not high or low, it's just a high-impedance (high-Z) input state, which can not be made use of in the code. So, you connect a pull-down resistor from the pin to ground, so that when the switch is open, the microcontroller pin is 0 - connected to ground.
Other applications maybe in communication, eg. I2C, etc, or converters, eg. ADC, DAC, etc.
Hope this helps.
Tahmid.
---------- Post added at 08:57 ---------- Previous post was at 08:51 ----------
Hi,
This should clear things:
In fig.1 the switch can only sink current, but when it is open, the pin is floating and this is unwanted. Here the pull-up sources current by pulling the pin upto a logic high.
In fig.2 the switch can only source current, but when it is open, the pin is floating and the pull-down sinks current by pulling the pin to a logic low.
Hope this helps.
Tahmid.