Google Sheets BITLSHIFT Function: Syntax, Examples & Tips

The BITLSHIFT function shifts bits of a number to the left or right, effectively multiplying or dividing the number by powers of two.
Google Sheets
BITLSHIFT(value, shift_amount)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is a BITLSHIFT?
  3. A Practical Example
  4. BITLSHIFT Formula
  5. Result of the Formula
  6. Why Use BITLSHIFT?
  7. Key Takeaways:
  8. Example use case

Parameters

value:
The number that you want to shift. This is the input value that will be modified by the bitwise shift operation.

shift_amount:
The number of bits to shift the value. This can be a positive number for a left shift (multiplying by powers of two) or a negative number for a right shift (dividing by powers of two).

What is a BITLSHIFT?

The BITLSHIFT function in Google Sheets is a bitwise operation that shifts the bits of a number to the left by a specified number of positions. This function is particularly useful in scenarios where you need to perform low-level data manipulation, such as in programming or when working with binary data. By shifting bits to the left, you effectively multiply the number by 2 for each position you shift.

In simpler terms, BITLSHIFT allows you to manipulate the binary representation of numbers, which can be helpful in various computational tasks.

A Practical Example

Imagine you are working with a set of binary values and you want to shift them to the left to see the results of multiplying them by powers of two.

Original Values Table:

DecimalBinary
10001
20010
30011

You want to shift these values to the left by 1 position.

BITLSHIFT Formula

To achieve this, you would use the BITLSHIFT function as follows:

Google Sheets
=BITLSHIFT(A2, 1)

In this formula:

  • A2 is the cell containing the decimal number you want to shift.
  • 1 is the number of positions you want to shift the bits to the left.

Result of the Formula

When you apply the BITLSHIFT formula to the Original Values Table, the output would look like this:

DecimalShifted Value
12
24
36

In this case, shifting the decimal values to the left by 1 position effectively doubles each value.

Why Use BITLSHIFT?

BITLSHIFT is beneficial because it allows for efficient manipulation of binary data without needing to convert numbers to binary and back. It simplifies operations that involve powers of two, making it a handy tool for developers and data analysts working with binary systems.

Key Takeaways:

  • BITLSHIFT: A function that shifts the bits of a number to the left, effectively multiplying it by powers of two.
  • Efficiency: Provides a quick way to perform bitwise operations without manual conversion.
  • Common Use Cases: Ideal for programming, data analysis, and scenarios where binary manipulation is required.

BITLSHIFT is an essential function for anyone working with binary data or needing to perform low-level data operations in Google Sheets.

Happy spreadsheeting!

Example use case

You have a table with binary values in Column A. By using the BITLSHIFT formula, you can shift these binary values to the left by a specified number of bits in Column B. This enables quick calculations for data manipulation in binary operations, enhancing data analysis efficiency.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.

BITLSHIFT in Google Sheets - Better Analyst