According to Andrew S. Tanenbaum (in "Computer Networks", Chap. 2, Section 4 "The Maximum Data Rate of a Channel"), the Nyquist/sampling theorem states that "if an arbitrary signal has been run through a low-pass filter of bandwidth $B$, the filtered signal can be completely reconstructed by making only $2B$ (exact) samples per second. Sampling the line faster than $2B$ times per second is pointless because the higher-frequency components that such sampling could recover have already been filtered out. If the signal consists of $V$ discrete levels, Nyquist’s theorem states:"
$$ \text{Maximum data rate} = 2B\log_2(V) \mbox{ bits/sec} $$
I'm not quite sure how that derives from the Nyquist theorem.
I (believe I) understood that the sampling rate of a signal with a maximum frequency of $f_{\rm max}$ has to be at least (strictly greater than) $\gt 2 f_{\rm max}$ for the signal to be fully reconstructed (a sampling rate of exactly $2 f_{\rm max}$ would not be sufficient if we measure a sin wave each point at an amplitude of zero) (assuming a noiseless channel).
Now, this makes me wonder how this leads to the maximum data rate. Say I'm sending a signal at a baud rate/with a bandwidth of $B=4$kHz and two levels ($S=2$). According to Tanenbaum, this means that I can at a theoretical maximum data rate twice as great as the baud rate. Why is that?
Is that because when reconstructing the signal, each peak and each trough is interpreted as a bit, so generally, each wave period consists of two bits?