calculating the log based 2