Pull-up/ pull-down resistors in CMOS gates
The first circuit has a pull-down resistor.  The high output voltage only reaches 4 volts due to the internal resistance of the output stage of the inverter and the current drawn by the pull-down resistor.

the second circuit has a pull-up resistor.  The low output voltage only goes down to 1 volt due to the internal resistance of the output stage of the inverter and the current drawn by the resistor.