Engineering functions

BITXOR

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
ArabicBITXOR
BulgarianBITXOR
CzechBITXOR
DanishBITXELLER
GermanBITXOR
GreekBITXOR
English (Australia)BITXOR
English (United Kingdom)BITXOR
English (United States)BITXOR
SpanishBIT.XO
EstonianBITXOR
FinnishBITTI.EHDOTON.TAI
FrenchBITOUEXCLUSIF
HebrewBITXOR
CroatianBITXOR
HungarianBIT.XVAGY
IndonesianBITXOR
ItalianBITXOR
JapaneseBITXOR
KoreanBITXOR
LithuanianBITXOR
LatvianBITXOR
NorwegianBITEKSKLUSIVELLER
DutchBIT.EX.OF
PolishBITXOR
Portuguese (Brazil)BITXOR
Portuguese (Portugal)BIT.XOU
RomanianBITXOR
RussianБИТ.ИСКЛИЛИ
SlovakBITXOR
SlovenianBITXOR
Serbian (Latin)BITXOR
SwedishBITXELLER
ThaiBITXOR
TurkishBİTÖZELVEYA
UkrainianBITXOR
VietnameseBITXOR
Chinese (Simplified)BITXOR
Chinese (Hong Kong)BITXOR
Chinese (Traditional)BITXOR

Names from Microsoft's support site.

What it does

BITXOR(number1, number2)

BITXOR(number1, number2) combines two nonnegative integers bit by bit. A result bit is one when exactly one 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.

=BITXOR(12,10) returns 6. In four bits the inputs are 1100 and 1010; applying XOR gives 0110.

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.

BITXOR · 1 lines · calc-func/src/catalogue/engineering.rs on GitHub
22 bitxor "BITXOR" (2, 2) [V "number1", V "number2"] |s, a, sv| { bits(s, a, k::bitxor_fn::bitxor_kernel) }
bitxor_kernel · 3 lines · calc-func/src/ported/bitxor_fn.rs on GitHub
pub fn bitxor_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

BITAND retains shared bits and BITOR retains either operand’s set bits. BITLSHIFT moves a pattern without combining two operands.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents