in order for something digital to be transmitted it has to be through wires
But how do they do that?
Indeed by using electrons.
Are they analog? Yes they are.
Do digital electrons exist? No.
So the signal send over a wire is analog by design, we don't have anything else. Evertthing on out planet is analog. Period.
Digital is using an analog signal in a weird way.
Normally we use absolute values, e.g. a cartridge of a turntable sending a signal to a phono stage. Any change in the signal will be translate in a change of the sound including a spike when the airco start up.
In case of digital we still use analog signals (there are no digital electrons) but instead of using the absolute value, we are looking for a marked change of state.
A transistor is open or closed, a magnetic field is N-S or S-N, a pit or a land (remember CDs?), etc.
All the time there is very marked change of state.
Conceptually this is represented by bits, a binary unit that can have only 2 values also conceptually represented by 0 and 1.
This is what makes digital so robust. We don’t use the absolute values, we use this marked change of state to detect our bits.
So digital signal over a wire is a block pulse. The signal rises sharply to e.g. 3 V and drops sharply to 0 V.
Of course in real live a block pulse don't exist.
This is how a block pulse might looks in real life.
If this would be interpreted as an analog signal (using the absolute value), this would be a disaster.
The over/under shoot, the rise/fall time, the ringing, etc., all would manifest themselves as distortion.
The moment our interpretation is digital (the electrons remains analog of course), we don’t have these problems.
Despite all the distortions, we can clearly detect the rise to approximately 100% and the fall to approximately 0% of the signal.
As long as we are able to detect this marked change of state accurately at the receiver, we will receive not only the right bits, but will also be able to reconstruct the signal.
This is why digital is to a large extend insensitive to noise and can be delivered all around the world without loss in accuracy.