The basic function of a diode is to restrict current flow to one direction. You can change the switch position to observe the forward and reverse bias diode. During reverse bias, no current is conducted in the circuit. During forward bias, the output voltage at resistor is 4.24V.
Vout = Vin -Vd