2^4 = 16

Therefore, 4 = log(16), base 2.

As Sql_lall said, it is based on the definiiton of what a logarithm is.