Engineering functions

BITLSHIFT

Matches all 8,135 recorded answers

Recorded: 8,131 in the answer bank and 4 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicBITLSHIFT
BulgarianBITLSHIFT
CzechBITLSHIFT
DanishBITLSKIFT
GermanBITLSHIFT
GreekBITLSHIFT
English (Australia)BITLSHIFT
English (United Kingdom)BITLSHIFT
English (United States)BITLSHIFT
SpanishBIT.DESPLIZQDA
EstonianBITLSHIFT
FinnishBITTI.SIIRTO.V
FrenchBITDECALG
HebrewBITLSHIFT
CroatianBITLSHIFT
HungarianBIT.BAL.ELTOL
IndonesianBITLSHIFT
ItalianBITLSHIFT
JapaneseBITLSHIFT
KoreanBITLSHIFT
LithuanianBITLSHIFT
LatvianBITLSHIFT
NorwegianBITLSHIFT
DutchBIT.VERSCHUIF.LINKS
PolishBIT.PRZESUNIĘCIE.W.LEWO
Portuguese (Brazil)BITLSHIFT
Portuguese (Portugal)BITDESL.ESQ
RomanianBITLSHIFT
RussianБИТ.СДВИГЛ
SlovakBITLSHIFT
SlovenianBITLSHIFT
Serbian (Latin)BITLSHIFT
SwedishBITVSKIFT
ThaiBITLSHIFT
TurkishBİTSOLAKAYDIR
UkrainianBITLSHIFT
VietnameseBITLSHIFT
Chinese (Simplified)BITLSHIFT
Chinese (Hong Kong)BITLSHIFT
Chinese (Traditional)BITLSHIFT

Names from Microsoft's support site.

What it does

BITLSHIFT(number, shift_amount)

BITLSHIFT(number, shift_amount) moves an integer’s binary digits left. A negative count reverses the direction. The ordinary left shift corresponds to multiplication by a power of two.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

=BITLSHIFT(13,2) returns 52. Binary 1101 becomes 110100 after appending two zeros. A count of -2 shifts right.

Quirks

The number must be an integer in 0..2^48-1; fractional numbers give #NUM!. The count is truncated. Documentation rejects count magnitudes above 53. Recorded build-20430 rules add exceptions: zero bypasses the finite count-range check, and admitted counts of magnitude 49 through 53 return zero in either direction.

How to implement

Validate the number first and require a finite count. Return zero immediately for a zero number. Otherwise truncate the count and reject magnitudes above 53; magnitudes 49 through 53 return zero. Convert the function and count sign to a left/right direction. Before a left shift of k, check number <= (2^48-1)>>k; reject overflow with #NUM!. A right shift discards the low bits. Return the resulting integer as a worksheet number. These shortcuts are recorded compatibility behaviour, and should not be replaced by a host language’s masked shift-count semantics.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

BITLSHIFT · 3 lines · calc-func/src/catalogue/engineering.rs on GitHub
23 bitlshift "BITLSHIFT" (2, 2) [V "number", V "shift_amount"] |s, a, sv| {
    bits(s, a, k::bitlshift_fn::bitlshift_kernel)
}
bitlshift_kernel · 3 lines · calc-func/src/ported/bitlshift_fn.rs on GitHub
pub fn bitlshift_kernel(number: f64, shift: f64) -> Result<f64, WorksheetErrorCode> {
    bit_shift_kernel(number, shift, true)
}

Kernels shared with other functions

Argument and result plumbing

  • num catalogue/kit
  • out catalogue/kit

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, CPU not recorded8,131

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

8,131 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

BITRSHIFT changes the default direction. BITAND extracts a bit field after shifting.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents