Hi,
May be this is the most basic question, but I don't understand the concept of pull up resistor and how they maintain the voltage value. For example lets take an example of below circuit. There is 5 volts battery and then there is 10K resistor which is further connected with the Vout which is most probably the load.

If we replace the load (Vout) with the resistor and see the voltage or make the load 1000K ohm to get the 5 volts then the circuit will be something like this.

So if we use the KVL to find the voltage across the load 1000K there will be less voltage. I dont understand how the pull up resistor can supply the voltage of 5 volts or how this pull up resistor is used.
May be this is the most basic question, but I don't understand the concept of pull up resistor and how they maintain the voltage value. For example lets take an example of below circuit. There is 5 volts battery and then there is 10K resistor which is further connected with the Vout which is most probably the load.

If we replace the load (Vout) with the resistor and see the voltage or make the load 1000K ohm to get the 5 volts then the circuit will be something like this.

So if we use the KVL to find the voltage across the load 1000K there will be less voltage. I dont understand how the pull up resistor can supply the voltage of 5 volts or how this pull up resistor is used.