Practice free

BITLSHIFT function

BITLSHIFT shifts the bits of a number to the left, which multiplies it by powers of two, and returns a whole number. Results of 2^48 or more return #NUM!.

Example

Read it as a sentence: shift the bits of 1 left by 4 places, which gives 16.

Practice this in the app

Syntax

BITLSHIFT(number, shift_amount)

number (required)
A whole number of 0 or more.
shift_amount (required)
How many bit positions to shift; negative values shift the other way.

Returns: The shifted whole number.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=BITLSHIFT(4,2) 16 4,2
=BITLSHIFT(4,0) 4 Shift 0
=BITLSHIFT(4,-2) 1 Negative shift
=BITLSHIFT(1,53) 0 Shift 53
=BITLSHIFT(1,-53) 0 Shift -53
=BITLSHIFT(4,1.9) 8 Decimal shift 1.9
=BITLSHIFT(1,54) #NUM! Shift 54
=BITLSHIFT(2^47,1) #NUM! Result over 2^48

Watch out for

  • Results of 2^48 or more return #NUM!.

Where it works

Excel
BITLSHIFT arrived in Excel 2013. Older versions do not have it.
Google Sheets
Same name, same behaviour for everyday use.

Part of Engineering functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .