Signal Noise Ratio Computation
Signal to noise ratio is defined as the ratio of the signal power to that of the noise power. Now, power of any signal \$x(t)\$ is defined as:
$$P = \frac{1}{T}\int_{\frac{-T}{2}}^\frac{T}{2}x(t)^2dt,$$
T = time period of the signal.
So by definition \$SNR = \frac{\int s(t)^2dt}{\int n(t)^2dt}\$.
But this definition has nothing to do with the mean value of the signal. It usually is expressed in dB's where we take \$10log_{10}SNR\$ not 20 as you mentioned in your question.
But it so happens that most random phenomenon in nature have guassian distribution. This is a consequence of central limit theorem which says that if we have a large set of random variables then the average variation would approach guassian distribution in the limit number of elements in the set approach infinity. This is the reason, for example, why the random noise of a resistor has guassian distribution or mismatch in the transistors has a guassian distribution.
Since there are a lot of processes which have a zero mean guassian distribution, it is common for the noise to have a zero mean. But in case noise does not have a zero mean, the SNR would still be given by the same formula as the definition of SNR is still the the same.