On this page is a log base 2 calculator. Enter a number to find the logarithm base 2 and we'll return the result.
Want a similar tool? Try another logarithm calculator or the generic logarithm tool:
Logarithm Base 2 Calculator
What is the Log Base 2?
The log base 2 is a logarithm which uses the base 2 in its calculations. Essentially, it asks "what power do I need to raise 2 to result in a value y."
Although it may appear to be an arbitrary choice, log base 2 is a natural choice in computer science and electrical engineering.
As electricity can be "on" or "off", binary values are expressed in "1" and "0" or "true" and "false". Every time you add a bit to the system, you double the possible states:
Since many elements in computers obey this constraint – RAM, hard disks, bandwidth, processor width, ... – it's easy to talk about things as powers of two.
Logarithm Base 2 Formula
The formula for the logarithm base 2 is:
Where:
- 2: the base of the equation, 2 (raise 2 to the yth power to get x)
- x: the argument; the number we need e^y to equal
- y: the power or exponent we need to find
Log Base 2 Example
Let's say you calculate you need to store something 12 KiloBytes in length in memory sold as a power of two. What's the smallest memory you could buy to store it? (In one chip)
For this case, you need a memory at least 2^17 bits wide, or 131,072 bits. This is an 128K memory.
Using the Logarithm Base 2 Calculator
Enter the argument x you'd like to find for the log base 2. In a sentence, that woulc be "log base 2 of x".
When happy, hit the Compute Log Base 2 button.
After, see the other tools and calculators.