Excel functions / Math
BITXOR function
Compares two whole numbers bit by bit and keeps the bits that are set in one but not the other.
Syntax
=BITXOR(number1, number2)
Arguments
number1: A whole number, 0 or more.number2: A second whole number, 0 or more.
When to use it
BITXOR keeps the bits set in exactly one of two whole numbers. It flips a flag: on becomes off, off becomes on.
Examples
Flip the 4 flag
A B C 1 Flags 2 13 9 In C2:
=BITXOR(A2, 4)→ 9
Common mistakes
- Negative numbers. Only whole numbers from 0 up are allowed.
BITXOR in other languages
Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.
- Czech: BITXOR
- Danish: BITXELLER
- Dutch: BIT.EX.OF
- Finnish: BITTI.EHDOTON.TAI
- French: BITOUEXCLUSIF
- German: BITXODER
- Hungarian: BIT.XVAGY
- Italian: BITXOR
- Norwegian: BITEKSKLUSIVELLER
- Polish: BITXOR
- Portuguese (Brazil): OUEXCLLÓGICO
- Portuguese (Portugal): BIT.XOU
- Russian: БИТ.ИСКЛИЛИ
- Spanish: BIT.XO
- Swedish: BITXELLER
- Turkish: BİTÖZELVEYA