# A-level Physics (Advancing Physics)/Digital Storage/Logarithms

That formula involved logarithms. If ab = c, then:

${\displaystyle \log _{a}c=b}$

In other words, a logarithm is a way of asking the question, "a to the power of what is c?" a is known as the base of the logarithm. log a is shorthand for log10a, and can be calculated using the 'log' button on a scientific calculator.

Just as with indices, there are some laws of logarithms. At present, we are only concerned with this one:

${\displaystyle \log _{a}(c^{n})=n\log _{a}c}$

If we apply this to the formula for calculating the number of possible values a pixel can take on (v = 2b), we can rearrange it to get a formula for b by taking the logarithm to the base 10 of both sides:

${\displaystyle \log v=\log(2^{b})}$

${\displaystyle \log v=b\log 2}$

${\displaystyle b={\frac {\log {v}}{\log {2}}}}$

We can then use a scientific calculator to calculate log 2, giving us the formula:

${\displaystyle b\approx {\frac {\log {v}}{0.3}}}$