In the shown below circuits, I understand the operation of the circuit but I cannot figure out why are we using diodes? I mean if the diodes are missing the circuit will still be valid and the truth table will still be true?? or am I missing something?