Determining the logical function of the circuit with diodes
If \$V_{IN}1\$ OR \$V_{IN}2\$ is at 5V, then point \$a\$ will be at 5V - \$V_{diode}\$.

As a diode forward voltage is approximately 0.7V, then point a will indeed be at 4.3V

D3 can only conduct if the cathode is 0.7V below its anode; as such, the only condition that satisfies this (assuming \$V_{CC}\$ to be 5V) is if both D1 and D2 are not conducting; i.e. they are both low. (This is a simplification - there could intermediate voltages involved at the inputs, but I am ignoring them for now).

So you have a Boolean expression that the output will be low if both inputs are also low; using DeMorgan's theorem, this is the same as:

The output will be high if \$V_1\$ OR \$V_2\$ is high; therefore it is logically an OR gate.