http://www.inference.org.uk/itprnn/book.html
The intro chapters cover the topic of measuring informational entropy.
Aside: One interesting application is to the problem of “use a balance scale only three times to determine which of twelve balls has the wrong weight (too heavy or light)”. You choose the weighings so as as to maximize the entropy of the outcome i.e. so there are many possible outcomes of equal probability.
4! is the number of permutations of a list - it's commonly seen throughout CS theory and other forms of discrete math.
log_2(n) is the number of bits needed to store a integer from 0 to n - it's reasonably commonly used in CS theory education.
But I might just recommend going to the source! which is Claude Shannon's seminal masters thesis on coding: http://affect-reason-utility.com/1301/4/shannon1948.pdf . It's surprisingly readable and worth at least skimming if you like this stuff.