# Log Base 2 Calculator

Written by:
PK

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:

## 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:

1:0\ vs\ 1\\2:00\ vs\ 01\ vs\ 10\ vs\ 11\\3:000\ vs\ 001\ vs\ 010\ vs\ 011\ vs\ 100\ vs\ 101\ vs\ 110\ vs\ 111\\etc...

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:

log_{2}(x)=y

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)

12 KB = 12,000\ Bytes = 96,000\ Bits\\log_2(96000)\approx16.55074679\\minimum\ 2^{17}

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.

### Don't Quit Your Day Job...

DQYDJ may be compensated by our advertising and affiliate partners if you make purchases through links. See our disclosures page for more information.