As you point out, electronic analog computers were designed to compute differential equations, not simple logical operations. You can model an arbitrary linear differential equation with a circuit made of op-amps, resistors, and capacitors, where the variables in your equation are represented by voltages and currents in your circuit.
For non-linearities you can add a diode. The Shockley diode equation gives a good approximation for the behavior of a diode:
$$I = I_s ( e^{\frac{V}{nV_T}} - 1 )$$
(where $V$ is the voltage across the diode terminals, $I$ is the current, and $I_s$ and $n V_T$ are constants that depend on the construction of the diode.) So now we can implement exponentials and logarithms.
So now to actually answer your question: logic circuits in modern digital computers are non-linear analog circuits where some circuit voltage or current is taken to represent the boolean value. For example, we might say that a voltage greater than 5V represents true
and a voltage less than 1V represents false
. (Any voltage between 1V and 5V is assumed to be an error).
In the 1950s this was sometimes implemented using diode logic. For example the Wikipedia page shows this diagram of an or
gate:

When this is followed by an inverting amplifier we get both a logical not
operation, and restoration of any voltage levels that have degraded away from 0V or 6V. For example a common emitter amplifier has this characteristic,

The point of all this is not that you have to use diodes and transistors to implement logic, but rather that any analog physical system with non-linearities and amplification can emulate boolean logic. Hydraulic pumps, for example would have done just as well as diodes and transistors.