May be it's atrivial question but i didn't know it
What is the use of the pull up resistance in input pins in the microcontroller from the electronic point of view?
A pull-up resistor is used in the design of electronic logic circuits. Pull-up resistors may be found at inputs to logic systems so that a definite logic level is asserted if an external device is disconnected. Pull-up resistors may also be used at the interface between two different types of logic devices, possibly operating at different power supply voltages.
u may come across the term open collector output . that means as the name implies that the collector of the switching tansistor is left open , and we have to connect a resistor between this open collector and the supply volatge to get the proper output;
In some places where the output pin current is low (like 8051 that sinks /source about 2-4ma current) which is not sufficient to drive a led . In that case the cheap solution is to use a resistor between anode and supply voltage from which the led may draw some additional current. this resistors are call pull up resistors.
Input pins require valid logic levels. If you leave an input pin disconnected it will "float" to an arbitrary voltage, and this voltage may not be a legal logic level. When an illegal logic level is applied to an input, the device may malfunction or, even worse, it can sometimes be damaged. By connecting a pull-up resistor to the pin, you are forcing a valid logic level when no other circuitry is driving the pin.