Engineering functions

BITAND

Matches all 5,993 recorded answers

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

Local names in 40 languages
LanguageName in Excel
ArabicBITAND
BulgarianBITAND
CzechBITAND
DanishBITOG
GermanBITAND
GreekBITAND
English (Australia)BITAND
English (United Kingdom)BITAND
English (United States)BITAND
SpanishBIT.Y
EstonianBITAND
FinnishBITTI.JA
FrenchBITET
HebrewBITAND
CroatianBITAND
HungarianBIT.ÉS
IndonesianBITAND
ItalianBITAND
JapaneseBITAND
KoreanBITAND
LithuanianBITAND
LatvianBITAND
NorwegianBITAND
DutchBIT.EN
PolishBITAND
Portuguese (Brazil)BITAND
Portuguese (Portugal)BIT.E
RomanianBITAND
RussianБИТ.И
SlovakBITAND
SlovenianBITAND
Serbian (Latin)BITAND
SwedishBITOCH
ThaiBITAND
TurkishBİTVE
UkrainianBITAND
VietnameseBITAND
Chinese (Simplified)BITAND
Chinese (Hong Kong)BITAND
Chinese (Traditional)BITAND

Names from Microsoft's support site.

What it does

BITAND(number1, number2)

BITAND(number1, number2) combines two nonnegative integers bit by bit. A result bit is one when both input bits are one. The returned value is a decimal worksheet number.

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.

=BITAND(12,10) returns 8. In four bits the inputs are 1100 and 1010; applying AND gives 1000.

Quirks

Both inputs must already be integers in 0..2^48-1 (281474976710655). Fractions are rejected with #NUM!, rather than truncated. Nonnumeric arguments give #VALUE!. Negative numbers do not denote a signed two’s-complement operand in this family.

How to implement

Coerce and validate the two numbers before integer conversion. Use a type able to retain all 48 admitted bits, then compute left & right and convert the result to binary64. Every admitted integer and result is exactly representable in binary64. Languages whose bitwise operators first narrow to 32 bits need a wider integer or arbitrary-precision integer path. The four-bit example uses no approximation; validation and error ordering are the separate worksheet obligations.

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.

BITAND · 1 lines · calc-func/src/catalogue/engineering.rs on GitHub
20 bitand "BITAND" (2, 2) [V "number1", V "number2"] |s, a, sv| { bits(s, a, k::bitand_fn::bitand_kernel) }
bitand_kernel · 3 lines · calc-func/src/ported/bitand_fn.rs on GitHub
pub fn bitand_kernel(lhs: f64, rhs: f64) -> Result<f64, WorksheetErrorCode> {
    Ok((coerce_bit_operand(lhs)? & coerce_bit_operand(rhs)?) as f64)
}

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 recorded5,989

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

5,989 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

BITOR sets selected bits and BITXOR toggles them. BITRSHIFT moves a masked field into a low-bit position.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents