BITLSHIFT Function
BITLSHIFT Function

BITLSHIFT Function

Shift bits to the left by a chosen number of positions. Useful for scaling by powers of two, building masks, and moving values into higher bit positions.

ExcelClash Team
PUBLISHED

Summary

BITLSHIFT moves the bits of a number to the left by a chosen number of positions. In practical terms, shifting left increases the value by powers of two as long as the result stays within Excel's supported range.

This is useful when you want to place a value into a higher bit position, build a mask, or scale a number in a bitwise way instead of plain arithmetic. It is one of the simplest tools for working with bit fields and packed values.

Its main role is structural rather than descriptive. BITLSHIFT helps place values into higher bit positions, which is useful when a workbook builds masks or packed numeric fields from smaller parts. The decimal result may grow quickly, but the real purpose is that the underlying bit pattern moves into the correct slot.

Purpose

Shift bits left

Moves bits into higher positions.

Return value

Number

Returns the decimal value of the shifted bit pattern.

Syntax

=BITLSHIFT(number, shift_amount)

number is the starting value. shift_amount is how many positions to move the bits.

A positive shift moves the bits to the left. A negative shift moves them the other way and behaves like BITRSHIFT. The answer is returned in decimal, even though the operation is happening on the binary form of the number.

Arguments

  • number - [required] A non-negative integer.
  • shift_amount - [required] An integer that tells Excel how far to shift.

number must be a whole number that is 0 or larger. shift_amount also has to be a whole number. Small shift values are the most practical because very large shifts can push the result outside the supported range and return #NUM!.

BITLSHIFT vs similar functions

BITLSHIFT is about moving bits, not just multiplying numbers in the usual way:

Function What it does Typical use Result
BITLSHIFT Moves bits left Scale by powers of two or build masks Number
BITRSHIFT Moves bits right Reduce or extract higher bits Number
* Multiplies numbers normally Regular arithmetic Number
DEC2BIN Shows a value in binary text Inspect the result visually Binary text

Using BITLSHIFT

The most direct way to think about BITLSHIFT is that every left shift multiplies by 2. A shift of 1 doubles the value, a shift of 2 multiplies by 4, and so on. That makes it useful when you want a fast, bit-based way to scale a value.

It is also a good way to move a value into a higher field. For example, shifting 255 left by 8 puts that pattern into a higher byte position. That is handy when you are building masks or packed values from smaller pieces.

Microsoft also notes that BITLSHIFT works with non-negative integers up to 2^48 - 1, and if the absolute shift amount is greater than 53 Excel returns #NUM!. A negative shift amount acts like shifting right. Source: Microsoft Support, BITLSHIFT function.

Example 1 - Shift 5 left by 1

This example shows the simplest left shift rule. Moving every bit one place to the left multiplies the number by 2.

That is why 5 becomes 10 here. It helps beginners connect the bit movement with the normal decimal result they see in the cell.

=BITLSHIFT(5, 1) // Returns 10
Check Answer
Challenge #1
Target: Sheet1!D1

Shift decimal 5 left by 1 bit (x2).

Example 2 - Move 255 into a higher byte

This example is useful when a value needs to be moved into a higher byte or field. The bits are not changing identity. They are just being shifted into a new position.

That is a common pattern in packed values and masks. You start with a smaller number and place it higher inside a larger binary structure.

=BITLSHIFT(255, 8) // Returns 65280
Check Answer
Challenge #2
Target: Sheet1!D2

Shift bit-value 255 to the high-byte pos (8 bits).

Example 3 - Build a mask with 1

This example starts with the value 1 and moves it left until it reaches the bit position you want. That gives you the decimal value of that single bit.

It is a simple way to build masks such as 2, 4, 8, 16, and so on without memorizing each one separately.

=BITLSHIFT(1, 4) // Returns 16
Check Answer
Challenge #3
Target: Sheet1!D3

Shift 1 by 4 bits to create a mask for bit-5 (16).

Example 4 - Shift 7 left by 2

This example extends the same pattern. A shift of 2 means the value is multiplied by 2^2, which is 4.

That helps show that left shifts scale very quickly. The more positions you move, the bigger the multiplier becomes.

=BITLSHIFT(7, 2) // Returns 28
Check Answer
Challenge #4
Target: Sheet1!D4

Shift decimal 7 left by 2 bits (x4).

Conclusion Recap

BITLSHIFT is useful when a value needs to be moved into higher bit positions. In this lesson, that meant seeing how a left shift preserves the pattern but relocates it, which is why the result grows in the same way as multiplying by powers of two.

This makes BITLSHIFT handy for building masks, packing values, or preparing one piece of data to sit in the correct bit slot inside a larger number. Once you think of it as "move the pattern left, then read the new decimal result," the function becomes much easier to reason about.

  • Moves bits left: BITLSHIFT pushes the pattern into higher positions.
  • Acts like multiplying by powers of two: A shift of 1 doubles the value.
  • Useful for masks and packed values: It helps build larger bit-based numbers from smaller pieces.
  • Negative shift amounts go the other way: Excel treats them like a right shift.
  • Works within Excel's bitwise limits: Large values or large shifts can return #NUM!.
Tactical Arena
Share BITLSHIFT Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.