Is a digital clock affected by special relativity? A well-known effect of SR is time dilation. For example, a clock going at $0.5c$ is slower than a stationary one. It seems bizarre to me that a mechanical clock and a digital one would both run slow since they run by different mechanisms. 
What exactly is going slower here so that both clock go slow and by the same amount? 
Is the clock not referring to a physical one, but some hypothetical "time measuring device"?
Edit: Maybe a more valid question is that what is is "clock"(ruler) when people talk about time dilation (length contraction)? Is it the same physical object as the one on my desk or is it simply referring to "a way of measuring time (length)
 A: If I am facing north while you are standing next to me facing west, and if I say there is a squirrel three feet in front of us and a lamppost four feet in front of us, then you are going to say that the same squirrel  is three feet to our right and the lamppost is four feet to our right.   Even though the squirrel and the lamppost are made of entirely different materials, they've both gone from being straight ahead in my coordinate system to being directly rightward in yours.  That, I hope, is not mysterious.  
More precisely:  I say the squirrel is at location $(0,3)$ and the lamppost is at location $(0.4)$ (with, therefore, a displacement vector of $(0,1)$), while you say they are at $(3,0)$ and $(4,0)$ (with a displacement vector of $(1,0)$).  The squirrel and the lamppost need know nothing about this.
Even moreso:  If any two things at all have a displacement vector of $(0,1)$ in my coordinates, those same things will have a displacement vector of $(1,0)$ in your coordinates --- and that would be true no matter how different from a squirrel or a lamppost those things might be.  This is because the internal workings of the squirrel are quite irrelevant to anything that's happening here.  
Now to the clock on the spaceship:  Because you (on the ship) are moving relative to me (on earth), you and I are facing different directions in spacetime.  That means we are going to label the same events with different coordinates.  (When we faced different directions in space, we used different coordinates to describe the same objects.  Now that we face different directions in spacetime, we are going to use different coordinates to describe the same events.)
I say that two successive ticks of the clock occurred about $.5$ light-seconds apart in the space direction and 1.2 seconds apart in the time direction, i.e. with a displacement vector of $(.5,1.2)$.  You say that two successive ticks of the clock occurred 0 light-seconds apart in the space direction and 1 second apart in the time direction, i.e. with a displacement vector of $(0,1)$.   We say this because we are using different coordinates to describe the same events.  
As long as I stick to my coordinate system and you stick to yours, every time I  see a displacement vector of $(.5,1.2)$, you will see a displacement vector of $(0,1)$.  --- because that's (a part of) the way our coordinate systems are related.  In particular, if we observe two clicks of a very different clock, with an entirely different construction, we'll still report the same ratio of time intervals --- because the internal workings of the clock are as irrelevant as the internal workings of the squirrel.
A: I gave this explanation on another website to some laymen and they liked it, so I'm going to copy the gist of it here.   As usual, corrections to my layman's explanations are welcome.
What happens when a clock's or mechanical watch's hand ticks one second is that something called the balance wheel inside the clock, keeps very accurate time.  Overview here.  The mechanical wrist watch in general is a rather remarkable bit of engineering that keeps very close to precise time.  It requires energy to keep running, either stored mechanical energy by winding, stored in the mainspring, or stored by battery.
But if we take a closer look at what happens when a balance wheel swings, that is, we look really close, it all goes down to the quantum level.  Protons and Electrons send signals to each other by photons.  That's how the tension on a spring is stored.   This can get a little complicated, so I'll just refer you to this question here.  
Now, velocity is relative.  The watch traveling at .5c thinks it's standing still and thinks you're the one moving, but if we use your frame of reference and we say the watch is moving and look at everything from your perspective, the protons and electrons are sending each other signals and energy by photons, the electromagnetic force carrying particle.  And when the watch is "moving" at .5c, depending on the placement, of the electron (and the electron is also everywhere at once, but lets not go there), but say it's ahead, in the direction the watch is moving.  The photon leaves the proton at c, cause photons always travel at c, but it has to catch up to the electron that's moving away from it at 1/2c.  That takes twice as much time (from your perspective).    Or, say, the electron is on the other side moving towards the spot where the proton is emitted the photon it takes 1/2 the time.  When averaged out over the sphere around the proton, the time it takes for protons and electrons to tell each other where they are works out to the Lorenz contraction when the atom is moving (relative to you), so when a mechanical spring moves past you at 1/2c, it takes the protons and electrons 15.5% longer to tell each other where they are and exchange energy and information.  That means the spring responds 15.5% slower.  
Now, because every proton and every electron that is moving at .5c relative to you is affected in the same way, the person wearing the watch doesn't experience the slowing down because everything slows down equally, or by his perspective, he's standing still and nothing is slowing down.  That's, at least, the special relativity explanation.  I'm not going to try to explain in general relativity cause that doesn't really change your question, but general relativity does explain how both objects can see the other moving slower, even if they meet up again at a later time. 
Short answer:  Everything's quantum.  Drop a cinder-block on your foot.  That's a quantum experience.  It can all be modeled by fields and quantum forces interacting.  It's just quite a bit easier to just look at it in the mechanical and stick with Newton's explanation.
