It shouldn’t come as too much of a shock, after all a quick look at many datasheets for general purpose diodes should reveal their description as switching diodes. So how does a diode switch work?
As with relays, all kinds of logic circuits were made using ... great reduction in size and power consumption. You guessed it, diodes can also be used to build logic gates, but not all of them ...