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.

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

One left shift doubles the value.

=BITLSHIFT(5, 1) // Returns 10
Check Answer
Challenge #1
Target: Sheet1!F1
Simple Left Shift

Shift decimal 5 left by 1 bit (x2). Formula: =BITLSHIFT(5, 1).

Example 2 - Move 255 into a higher byte

This pushes the bit pattern into a higher position.

=BITLSHIFT(255, 8) // Returns 65280
Check Answer
Challenge #2
Target: Sheet1!F2
Byte-to-Word Offset

Shift bit-value 255 to the high-byte pos (8 bits). Formula: =BITLSHIFT(255, 8).

Example 3 - Build a mask with 1

Shifting 1 is a simple way to get the value of a target bit.

=BITLSHIFT(1, 4) // Returns 16
Check Answer
Challenge #3
Target: Sheet1!F3
Mask Bit-5 Creation

Shift 1 by 4 bits to create a mask for bit-5 (16). Formula: =BITLSHIFT(1, 4).

Example 4 - Shift 7 left by 2

A shift of 2 multiplies the value by 4.

=BITLSHIFT(7, 2) // Returns 28
Check Answer
Challenge #4
Target: Sheet1!F4
Address Scaling Test

Shift decimal 7 left by 2 bits (x4). Formula: =BITLSHIFT(7, 2).

Quick recap

  • 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
Select Scenario:
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.